!3 upgrade to v2.5

From: @xiezhipeng1
Reviewed-by: @hanxinke
Signed-off-by: @hanxinke
This commit is contained in:
openeuler-ci-bot 2020-10-10 11:00:02 +08:00 committed by Gitee
commit 0f8120f47f
8 changed files with 82 additions and 304 deletions

View File

@ -1,36 +0,0 @@
# python-networkx
#### Description
python package for the study of complex network
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,37 +0,0 @@
# python-networkx
#### 介绍
python package for the study of complex network
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

Binary file not shown.

BIN
networkx-2.5.tar.gz Normal file

Binary file not shown.

View File

@ -1,29 +0,0 @@
make importing of drawing and geo subpackages optional
diff -Naur networkx-networkx-1.10.orig/networkx/__init__.py networkx-networkx-1.10/networkx/__init__.py
--- networkx-networkx-1.10.orig/networkx/__init__.py 2015-10-30 15:41:35.000000000 -0600
+++ networkx-networkx-1.10/networkx/__init__.py 2015-11-24 09:34:20.741823392 -0700
@@ -95,5 +95,8 @@
from networkx.linalg import *
from networkx.tests.test import run as test
-import networkx.drawing
-from networkx.drawing import *
+try:
+ import networkx.drawing
+ from networkx.drawing import *
+except ImportError:
+ pass
diff -Naur networkx-networkx-1.10.orig/networkx/readwrite/__init__.py networkx-networkx-1.10/networkx/readwrite/__init__.py
--- networkx-networkx-1.10.orig/networkx/readwrite/__init__.py 2015-10-30 15:41:35.000000000 -0600
+++ networkx-networkx-1.10/networkx/readwrite/__init__.py 2015-11-24 09:34:46.539738141 -0700
@@ -14,4 +14,8 @@
from networkx.readwrite.gml import *
from networkx.readwrite.graphml import *
from networkx.readwrite.gexf import *
-from networkx.readwrite.nx_shp import *
+
+try:
+ from networkx.readwrite.nx_shp import *
+except ImportError:
+ pass

View File

@ -1,11 +0,0 @@
diff -up networkx-networkx-1.11/doc/source/conf.py.sphinx networkx-networkx-1.11/doc/source/conf.py
--- networkx-networkx-1.11/doc/source/conf.py.sphinx 2016-01-30 10:25:44.000000000 -0700
+++ networkx-networkx-1.11/doc/source/conf.py 2016-12-23 09:54:55.280925006 -0700
@@ -74,7 +74,6 @@ extensions = [
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
- 'sphinx.ext.pngmath',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
#'sphinxcontrib.bibtex',

View File

@ -1,213 +1,100 @@
Name: python-networkx %global _empty_manifest_terminate_build 0
Version: 1.11 Name: python-networkx
Release: 14 Version: 2.5
Summary: Python package for creating and manipulating graphs and networks Release: 1
License: BSD Summary: Python package for creating and manipulating graphs and networks
URL: http://networkx.github.io/ License: BSD License
Source0: https://github.com/networkx/networkx/archive/networkx-1.11.tar.gz URL: http://networkx.github.io/
# make importing of drawing and geo subpackages optional Source0: https://files.pythonhosted.org/packages/ef/d0/f706a9e5814a42c544fa1b2876fc33e5d17e1f2c92a5361776632c4f41ab/networkx-2.5.tar.gz
Patch0000: networkx-optional-modules.patch BuildArch: noarch
# Fix sphinx build error
# https://github.com/networkx/networkx/issues/2340 Requires: python3-decorator
Patch0001: python-networkx-sphinx.patch Requires: python3-numpy
BuildArch: noarch Requires: python3-scipy
Requires: python3-pandas
Requires: python3-matplotlib
Requires: python3-pygraphviz
Requires: python3-pydot
Requires: python3-pyyaml
Requires: python3-lxml
Requires: python3-pytest
Requires: python3-gdal
Requires: python3-lxml
Requires: python3-matplotlib
Requires: python3-numpy
Requires: python3-pandas
Requires: python3-pydot
Requires: python3-pygraphviz
Requires: python3-pytest
Requires: python3-pyyaml
Requires: python3-scipy
%description %description
NetworkX is a Python 2 package for the creation, manipulation, and NetworkX is a Python package for the creation, manipulation,
study of the structure, dynamics, and functions of complex networks. and study of the structure, dynamics, and functions
of complex networks.
%package -n python2-networkx
Summary: Creates and Manipulates Graphs and Networks
Requires: python2-networkx-core = 1.11-14 python2-networkx-geo = 1.11-14
Requires: python2-networkx-drawing = 1.11-14
%{?python_provide:%python_provide python2-networkx}
%description -n python2-networkx
NetworkX is a Python 2 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
%package -n python2-networkx-core
Summary: Creates and Manipulates Graphs and Networks
BuildRequires: python2-devel python2-decorator python2-scipy python2-setuptools
BuildRequires: python2-yaml python2-pyparsing python2-nose
Requires: python2-decorator python2-scipy python2-yaml python2-pyparsing
%{?python_provide:%python_provide python2-networkx-core}
%description -n python2-networkx-core
NetworkX is a Python 2 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
%package -n python2-networkx-geo
Summary: GDAL I/O
Requires: python2-networkx-core = 1.11-14 python2-gdal
BuildRequires: python2-gdal
%{?python_provide:%python_provide python2-networkx-geo}
%description -n python2-networkx-geo
NetworkX is a Python 3 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
This package provides GDAL I/O support.
%package -n python2-networkx-drawing
Summary: visual representations for graphs and networks
Requires: python2-networkx-core = 1.11-14
BuildRequires: python2.7dist(gv) python2-matplotlib python2-pydotplus
Requires: python2.7dist(gv) python2-matplotlib python2-pydotplus
%{?python_provide:%python_provide python2-networkx-drawing}
%description -n python2-networkx-drawing
NetworkX is a Python 3 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
This package provides support for graph visualizations.
%package -n python3-networkx %package -n python3-networkx
Summary: Creates and Manipulates Graphs and Networks Summary: Python package for creating and manipulating graphs and networks
Requires: python3-networkx-core = 1.11-14 python3-networkx-geo = 1.11-14 Provides: python-networkx
Requires: python3-networkx-drawing = 1.11-14 BuildRequires: python3-devel
BuildRequires: python3-setuptools
%{?python_provide:%python_provide python3-networkx}
%description -n python3-networkx %description -n python3-networkx
NetworkX is a Python 3 package for the creation, manipulation, and NetworkX is a Python package for the creation, manipulation,
study of the structure, dynamics, and functions of complex networks. and study of the structure, dynamics, and functions
of complex networks.
%package -n python3-networkx-core
Summary: Creates and Manipulates Graphs and Networks
BuildRequires: python3-devel python3-decorator python3-yaml
BuildRequires: python3-scipy python3-pyparsing python3-setuptools
Requires: python3-decorator python3-yaml python3-scipy python3-pyparsing
%{?python_provide:%python_provide python3-networkx-core}
%description -n python3-networkx-core
NetworkX is a Python 3 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
%package -n python3-networkx-geo
Summary: GDAL I/O
Requires: python3-networkx-core = 1.11-14 gdal-python3
BuildRequires: gdal-python3
%{?python_provide:%python_provide python3-networkx-geo}
%description -n python3-networkx-geo
NetworkX is a Python 3 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
This package provides GDAL I/O support.
%package -n python3-networkx-drawing
Summary: visual representations for graphs and networks
Requires: python3-networkx-core = 1.11-14 python3-matplotlib python3-pydotplus
BuildRequires: python3-matplotlib python3-pydotplus
%{?python_provide:%python_provide python3-networkx-drawing}
%description -n python3-networkx-drawing
NetworkX is a Python 3 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
This package provides support for graph visualizations.
%package help %package help
Summary: Documentation for networkx Summary: Development documents and examples for networkx
BuildRequires: python2-pandas python2-pydotplus python2-sphinx python2-sphinx_rtd_theme Provides: python3-networkx-doc
BuildRequires: python2-sphinxcontrib-bibtex python2-ipython python2-numpydoc
BuildRequires: tex(latex) tex-preview python2-matplotlib
Provides: bundled(jquery) python-networkx-doc = 1.11-14
Obsoletes: python-networkx-doc < 1.11-14
%description help %description help
Documentation for networkx NetworkX is a Python package for the creation, manipulation,
and study of the structure, dynamics, and functions
of complex networks.
%prep %prep
%autosetup -n networkx-networkx-%{version} -p1 %autosetup -n networkx-2.5
find examples -type f -perm /0111 | xargs chmod a-x
%build %build
%py2_build
sed -i 's/^[[:blank:]]*python/&2/' doc/Makefile
PYTHONPATH=$PWD/build/lib make SPHINXBUILD=sphinx-build-2 -C doc html
mv build build2
mv networkx/*.pyc build2
%py3_build %py3_build
%install %install
%py3_install %py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
mv build build3 %files -n python3-networkx -f filelist.lst
mv build2 build %dir %{python3_sitelib}/*
mv -f build/*.pyc networkx
%py2_install %files help -f doclist.lst
mv $RPM_BUILD_ROOT%{_docdir}/networkx-1.11 ./installed-docs %{_docdir}/*
rm -f installed-docs/INSTALL.txt
for f in `grep -FRl /usr/bin/env $RPM_BUILD_ROOT%{python2_sitelib}`; do
sed 's|/usr/bin/env python|%{_bindir}/python2|' $f > $f.new
touch -r $f $f.new
chmod a+x $f.new
mv -f $f.new $f
done
for f in `grep -FRl /usr/bin/env $RPM_BUILD_ROOT%{python3_sitelib}`; do
sed 's|/usr/bin/env python|%{_bindir}/python3|' $f > $f.new
touch -r $f $f.new
chmod a+x $f.new
mv -f $f.new $f
done
%clean
rm -fr %{buildroot}
rm -f /tmp/tmp??????
%check
mkdir site-packages
mv networkx site-packages
PYTHONPATH=$PWD/site-packages python2 -c "import networkx; networkx.test()"
%files -n python2-networkx
%doc README.rst LICENSE.txt
%files -n python2-networkx-core
%doc installed-docs/*
%{python2_sitelib}/*
%exclude %{python2_sitelib}/networkx/drawing/
%exclude %{python2_sitelib}/networkx/readwrite/nx_shp.py*
%files -n python2-networkx-drawing
%{python2_sitelib}/networkx/drawing
%files -n python2-networkx-geo
%{python2_sitelib}/networkx/readwrite/nx_shp.py*
%files -n python3-networkx
%doc README.rst LICENSE.txt
%files -n python3-networkx-core
%doc installed-docs/*
%{python3_sitelib}/*
%exclude %{python3_sitelib}/networkx/drawing/
%exclude %{python3_sitelib}/networkx/readwrite/nx_shp.py
%exclude %{python3_sitelib}/networkx/readwrite/__pycache__/nx_shp.*
%files -n python3-networkx-drawing
%{python3_sitelib}/networkx/drawing
%files -n python3-networkx-geo
%{python3_sitelib}/networkx/readwrite/nx_shp.py
%{python3_sitelib}/networkx/readwrite/__pycache__/nx_shp.*
%files help
%doc doc/build/html/*
%changelog %changelog
* Wed Sep 30 2020 Python_Bot <Python_Bot@openeuler.org> 2.5-1
- Package Spec generated
* Tue May 10 2020 liangdong <liangdong10@huawei.com> - 1.11-14 * Tue May 10 2020 liangdong <liangdong10@huawei.com> - 1.11-14
- Package init - Package init

4
python-networkx.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: networkx
tag_prefix:
seperator: .