[python-networkx] New upstream version. Drop upstreamed -test-rounding-fix patch. Upstream no longer bundles python-de
Jerry James
jjames at fedoraproject.org
Tue Jul 8 16:54:17 UTC 2014
commit 180205f797efb7a23fa621bb3da2e1d6e32a78e8
Author: Jerry James <jamesjer at betterlinux.com>
Date: Tue Jul 8 10:54:16 2014 -0600
New upstream version.
Drop upstreamed -test-rounding-fix patch.
Upstream no longer bundles python-decorator; drop the workaround.
.gitignore | 2 +-
networkx-nose1.0.patch | 6 +-
networkx-optional-modules.patch | 30 ++++++
...ts.patch => networkx-skip-scipy-0.8-tests.patch | 14 ++--
optional-modules.patch | 30 ------
python-networkx.spec | 99 +++++++++----------
sources | 8 +-
test-rounding-fix.patch | 14 ---
8 files changed, 92 insertions(+), 111 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7628e86..911cb09 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
/networkx_reference.pdf
/networkx_tutorial.pdf
/networkx-documentation.zip
-/networkx-1.8.1.tar.gz
+/networkx-1.9.tar.gz
diff --git a/networkx-nose1.0.patch b/networkx-nose1.0.patch
index f73d46f..75c5613 100644
--- a/networkx-nose1.0.patch
+++ b/networkx-nose1.0.patch
@@ -1,6 +1,6 @@
-diff -Naur networkx-1.8.1.orig/networkx/tests/test.py networkx-1.8.1/networkx/tests/test.py
---- networkx-1.8.1.orig/networkx/tests/test.py 2013-08-04 13:53:31.000000000 +0000
-+++ networkx-1.8.1/networkx/tests/test.py 2014-03-17 20:49:15.624551199 +0000
+diff -Naur networkx-1.9.orig/networkx/tests/test.py networkx-1.9/networkx/tests/test.py
+--- networkx-1.9.orig/networkx/tests/test.py 2014-06-25 11:50:58.000000000 -0600
++++ networkx-1.9/networkx/tests/test.py 2014-06-30 12:00:00.000000000 -0600
@@ -2,6 +2,24 @@
import sys
from os import path,getcwd
diff --git a/networkx-optional-modules.patch b/networkx-optional-modules.patch
new file mode 100644
index 0000000..af944aa
--- /dev/null
+++ b/networkx-optional-modules.patch
@@ -0,0 +1,30 @@
+make importing of drawing and geo subpackages optional
+
+diff -Naur networkx-1.9.orig/networkx/__init__.py networkx-1.9/networkx/__init__.py
+--- networkx-1.9.orig/networkx/__init__.py 2014-06-25 12:02:09.000000000 -0600
++++ networkx-1.9/networkx/__init__.py 2014-06-30 12:00:00.000000000 -0600
+@@ -84,6 +84,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-1.9.orig/networkx/readwrite/__init__.py networkx-1.9/networkx/readwrite/__init__.py
+--- networkx-1.9.orig/networkx/readwrite/__init__.py 2014-06-25 11:50:58.000000000 -0600
++++ networkx-1.9/networkx/readwrite/__init__.py 2014-06-30 12:00:00.000000000 -0600
+@@ -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
diff --git a/skip-scipy-0.8-tests.patch b/networkx-skip-scipy-0.8-tests.patch
similarity index 70%
rename from skip-scipy-0.8-tests.patch
rename to networkx-skip-scipy-0.8-tests.patch
index e639348..176b698 100644
--- a/skip-scipy-0.8-tests.patch
+++ b/networkx-skip-scipy-0.8-tests.patch
@@ -4,9 +4,9 @@ el6 currently has scipy 0.7 and the following is only supported by 0.8:
Also on el6 the drawing/tests/test_layout.py fails as the following is only supported by 0.8:
scipy.sparse.linalg.eigen_symmetric
-diff -Naur networkx-1.8.1.orig/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py networkx-1.8.1/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py
---- networkx-1.8.1.orig/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py 2013-08-04 13:53:31.000000000 +0000
-+++ networkx-1.8.1/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py 2014-03-17 21:37:38.623458820 +0000
+diff -Naur networkx-1.9.orig/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py networkx-1.9/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py
+--- networkx-1.9.orig/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py 2014-06-25 11:50:58.000000000 -0600
++++ networkx-1.9/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality.py 2014-06-30 12:00:00.000000000 -0600
@@ -41,17 +41,6 @@
for n in sorted(G):
assert_almost_equal(b[n],wb_answer[n])
@@ -42,9 +42,9 @@ diff -Naur networkx-1.8.1.orig/networkx/algorithms/centrality/tests/test_current
class TestApproximateFlowBetweennessCentrality(object):
-diff -Naur networkx-1.8.1.orig/networkx/drawing/tests/test_layout.py networkx-1.8.1/networkx/drawing/tests/test_layout.py
---- networkx-1.8.1.orig/networkx/drawing/tests/test_layout.py 2013-08-04 13:53:31.000000000 +0000
-+++ networkx-1.8.1/networkx/drawing/tests/test_layout.py 2014-03-17 21:40:40.192283827 +0000
+diff -Naur networkx-1.9.orig/networkx/drawing/tests/test_layout.py networkx-1.9/networkx/drawing/tests/test_layout.py
+--- networkx-1.9.orig/networkx/drawing/tests/test_layout.py 2014-06-25 11:50:58.000000000 -0600
++++ networkx-1.9/networkx/drawing/tests/test_layout.py 2014-06-30 12:00:00.000000000 -0600
@@ -46,16 +46,3 @@
pos=nx.drawing.layout._fruchterman_reingold(A)
pos=nx.drawing.layout._fruchterman_reingold(A,dim=3)
@@ -56,7 +56,7 @@ diff -Naur networkx-1.8.1.orig/networkx/drawing/tests/test_layout.py networkx-1.
- except ImportError:
- raise SkipTest('scipy not available.')
-
-- A=nx.to_scipy_sparse_matrix(self.Gs,dtype='f')
+- A=nx.to_scipy_sparse_matrix(self.Gs,dtype='d')
- pos=nx.drawing.layout._sparse_fruchterman_reingold(A)
- pos=nx.drawing.layout._sparse_spectral(A)
-
diff --git a/python-networkx.spec b/python-networkx.spec
index 42cd729..475e0a3 100644
--- a/python-networkx.spec
+++ b/python-networkx.spec
@@ -1,6 +1,9 @@
-%if 0%{?fedora} > 12
+%if 0%{?fedora} >= 12 || 0%{?rhel} >= 8
%global with_python3 1
%endif
+%if !0%{?rhel}
+%global with_gdal 1
+%endif
# see https://fedoraproject.org/wiki/Packaging:Python#Macros
%if 0%{?rhel} && 0%{?rhel} <= 6
@@ -9,25 +12,26 @@
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
-Name: python-networkx
-Version: 1.8.1
-Release: 14%{?dist}
+%global pkgname networkx
+
+Name: python-%{pkgname}
+Version: 1.9
+Release: 1%{?dist}
Summary: Creates and Manipulates Graphs and Networks
Group: Development/Languages
License: BSD
URL: http://networkx.github.io/
-Source0: https://pypi.python.org/packages/source/n/networkx/networkx-%{version}.tar.gz
-Source1: http://networkx.github.io/documentation/latest/_downloads/networkx_reference.pdf
-Source2: http://networkx.github.io/documentation/latest/_downloads/networkx_tutorial.pdf
-Source3: http://networkx.github.io/documentation/latest/_downloads/networkx-documentation.zip
-Patch0: optional-modules.patch
-Patch1: test-rounding-fix.patch
-Patch2: networkx-nose1.0.patch
-Patch3: skip-scipy-0.8-tests.patch
+Source0: https://pypi.python.org/packages/source/n/%{pkgname}/%{pkgname}-%{version}.tar.gz
+Source1: http://networkx.github.io/documentation/%{pkgname}-%{version}/_downloads/networkx_reference.pdf
+Source2: http://networkx.github.io/documentation/%{pkgname}-%{version}/_downloads/networkx_tutorial.pdf
+Source3: http://networkx.github.io/documentation/%{pkgname}-%{version}/_downloads/networkx-documentation.zip
+Patch0: %{pkgname}-optional-modules.patch
+Patch1: %{pkgname}-nose1.0.patch
+Patch2: %{pkgname}-skip-scipy-0.8-tests.patch
BuildArch: noarch
Requires: %{name}-core = %{version}-%{release}
-%if !0%{?rhel}
+%if 0%{?with_gdal}
Requires: %{name}-geo = %{version}-%{release}
Requires: %{name}-drawing = %{version}-%{release}
%endif
@@ -58,7 +62,7 @@ NetworkX is a Python 2 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
-%if !0%{?rhel}
+%if 0%{?with_gdal}
%package geo
Summary: GDAL I/O
@@ -92,17 +96,17 @@ This package provides support for graph visualizations.
%if 0%{?with_python3}
-%package -n python3-networkx
+%package -n python3-%{pkgname}
Summary: Creates and Manipulates Graphs and Networks
-Requires: python3-networkx-core = %{version}-%{release}
-Requires: python3-networkx-geo = %{version}-%{release}
-Requires: python3-networkx-drawing = %{version}-%{release}
+Requires: python3-%{pkgname}-core = %{version}-%{release}
+Requires: python3-%{pkgname}-geo = %{version}-%{release}
+Requires: python3-%{pkgname}-drawing = %{version}-%{release}
-%description -n python3-networkx
+%description -n python3-%{pkgname}
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-core
+%package -n python3-%{pkgname}-core
Summary: Creates and Manipulates Graphs and Networks
BuildRequires: python3-devel
BuildRequires: python3-decorator
@@ -114,26 +118,26 @@ Requires: python3-PyYAML
Requires: python3-scipy
Requires: python3-pyparsing
-%description -n python3-networkx-core
+%description -n python3-%{pkgname}-core
NetworkX is a Python 3 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
-%if !0%{?rhel}
-%package -n python3-networkx-geo
+%if 0%{?with_gdal}
+%package -n python3-%{pkgname}-geo
Summary: GDAL I/O
-Requires: python3-networkx-core = %{version}-%{release}
+Requires: python3-%{pkgname}-core = %{version}-%{release}
BuildRequires: gdal-python
Requires: gdal-python
-%description -n python3-networkx-geo
+%description -n python3-%{pkgname}-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
+%package -n python3-%{pkgname}-drawing
Summary: visual representations for graphs and networks
-Requires: python3-networkx-core = %{version}-%{release}
+Requires: python3-%{pkgname}-core = %{version}-%{release}
BuildRequires: graphviz-python
BuildRequires: pydot
BuildRequires: python3-matplotlib
@@ -141,7 +145,7 @@ Requires: graphviz-python
Requires: pydot
Requires: python3-matplotlib
-%description -n python3-networkx-drawing
+%description -n python3-%{pkgname}-drawing
NetworkX is a Python 3 package for the creation, manipulation, and
study of the structure, dynamics, and functions of complex networks.
@@ -159,6 +163,8 @@ Group: Documentation
BuildRequires: python-sphinx10
%else
BuildRequires: python-sphinx
+BuildRequires: python-sphinx_rtd_theme
+BuildRequires: python-numpydoc
%endif
BuildRequires: tex(latex)
BuildRequires: tex-preview
@@ -170,36 +176,19 @@ Documentation for networkx
%prep
-%setup -q -n networkx-%{version}
+%setup -q -n %{pkgname}-%{version}
%patch0 -p1
-%patch1 -p1
%if 0%{?rhel} == 6
+%patch1 -p1
%patch2 -p1
-%patch3 -p1
%endif
# Fix permissions
find examples -type f -perm /0111 | xargs chmod a-x
-# Overwrite the 0-length doc files with the real doc files
+# Avoid downloading the doc files while building
cp -pf %{SOURCE1} %{SOURCE2} %{SOURCE3} doc/source
-# Use the system python-decorator instead of the bundled version
-sed -e '/ "networkx\.external.*",/d' \
- -e "/sys\.version >= '3'/,/^$/d" \
- -i setup.py
-cd networkx
-rm -fr external
-sed "/import networkx\.external/d" __init__.py > init.py
-touch -r __init__.py init.py
-mv -f init.py __init__.py
-for f in utils/decorators.py utils/misc.py; do
- sed "s/networkx\.external\.//" $f > fixed.py
- touch -r $f fixed.py
- mv -f fixed.py $f
-done
-cd ..
-
%build
python2 setup.py build
%if 0%{?rhel} == 6
@@ -251,6 +240,7 @@ done
%endif
%clean
+rm -fr %{buildroot}
rm -f /tmp/tmp??????
%check
@@ -265,11 +255,11 @@ PYTHONPATH=`pwd`/site-packages python -c "import networkx; networkx.test()"
%doc installed-docs/*
%{python2_sitelib}/*
%exclude %{python2_sitelib}/networkx/drawing/
-%if !0%{?rhel}
+%if 0%{?with_gdal}
%exclude %{python2_sitelib}/networkx/readwrite/nx_shp.py
%endif
-%if !0%{?rhel}
+%if 0%{?with_gdal}
%files drawing
%{python2_sitelib}/networkx/drawing
@@ -285,11 +275,11 @@ PYTHONPATH=`pwd`/site-packages python -c "import networkx; networkx.test()"
%doc installed-docs/*
%{python3_sitelib}/*
%exclude %{python3_sitelib}/networkx/drawing/
-%if !0%{?rhel}
+%if 0%{?with_gdal}
%exclude %{python3_sitelib}/networkx/readwrite/nx_shp.py
%endif
-%if !0%{?rhel}
+%if 0%{?with_gdal}
%files -n python3-networkx-drawing
%{python2_sitelib}/networkx/drawing
@@ -304,6 +294,11 @@ PYTHONPATH=`pwd`/site-packages python -c "import networkx; networkx.test()"
%changelog
+* Tue Jul 8 2014 Jerry James <loganjerry at gmail.com> - 1.9-1
+- New upstream version
+- Drop upstreamed -test-rounding-fix patch
+- Upstream no longer bundles python-decorator; drop the workaround
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.8.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/sources b/sources
index 4d9444e..72c98dd 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-b4a9e68ecd1b0164446ee432d2e20bd0 networkx-1.8.1.tar.gz
-83e7ca6252d5a54d993b6cacf2e5460a networkx_reference.pdf
-d9068eaf009f4a878d660e2f93cbad37 networkx_tutorial.pdf
-66de4371040d834cf73eea5bbe7e6b0c networkx-documentation.zip
+683ca697a9ad782cb78b247cbb5b51d6 networkx-1.9.tar.gz
+76e5a97139e2951189d0d112faa8c37a networkx_reference.pdf
+677b4c736c892c3389dacfe2f2501449 networkx_tutorial.pdf
+9f5732ca3102eed3e43e4501648c03a0 networkx-documentation.zip
More information about the scm-commits
mailing list