New upstream version.
- Drop upstreamed -abc patch - Add a -test subpackage (bz 1668197) - Convert most Requires to Recommends (bz 1668197)
This commit is contained in:
parent
fdd0bdd41f
commit
00677b7f7b
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,7 +1,4 @@
|
||||
/networkx_reference.pdf
|
||||
/networkx_tutorial.pdf
|
||||
/networkx-documentation.zip
|
||||
/networkx-1.9.1.tar.gz
|
||||
/networkx-1.10.tar.gz
|
||||
/networkx-1.11.tar.gz
|
||||
/networkx-2.2.tar.gz
|
||||
/networkx-*.tar.gz
|
||||
|
||||
@ -1,77 +0,0 @@
|
||||
--- networkx/algorithms/approximation/kcomponents.py.orig 2018-09-19 12:30:34.000000000 -0600
|
||||
+++ networkx/algorithms/approximation/kcomponents.py 2018-10-30 14:18:27.433887139 -0600
|
||||
@@ -5,7 +5,8 @@
|
||||
# All rights reserved.
|
||||
# BSD license.
|
||||
import itertools
|
||||
-from collections import defaultdict, Mapping
|
||||
+from collections import defaultdict
|
||||
+from collections.abc import Mapping
|
||||
|
||||
import networkx as nx
|
||||
from networkx.exception import NetworkXError
|
||||
--- networkx/algorithms/lowest_common_ancestors.py.orig 2018-09-19 12:30:34.000000000 -0600
|
||||
+++ networkx/algorithms/lowest_common_ancestors.py 2018-10-30 14:16:43.362693490 -0600
|
||||
@@ -10,7 +10,8 @@
|
||||
#
|
||||
# Author: Alex Roper <aroper@umich.edu>
|
||||
"""Algorithms for finding the lowest common ancestor of trees and DAGs."""
|
||||
-from collections import defaultdict, Mapping, Set
|
||||
+from collections import defaultdict
|
||||
+from collections.abc import Mapping, Set
|
||||
from itertools import chain, count
|
||||
|
||||
import networkx as nx
|
||||
--- networkx/classes/coreviews.py.orig 2018-09-19 12:30:34.000000000 -0600
|
||||
+++ networkx/classes/coreviews.py 2018-10-30 14:19:56.696337812 -0600
|
||||
@@ -10,7 +10,7 @@
|
||||
# Dan Schult(dschult@colgate.edu)
|
||||
"""
|
||||
"""
|
||||
-from collections import Mapping
|
||||
+from collections.abc import Mapping
|
||||
import networkx as nx
|
||||
|
||||
__all__ = ['AtlasView', 'AdjacencyView', 'MultiAdjacencyView',
|
||||
--- networkx/classes/graph.py.orig 2018-09-19 12:30:34.000000000 -0600
|
||||
+++ networkx/classes/graph.py 2018-10-30 14:19:28.369829478 -0600
|
||||
@@ -20,7 +20,7 @@ For directed graphs see DiGraph and Mult
|
||||
from __future__ import division
|
||||
import warnings
|
||||
from copy import deepcopy
|
||||
-from collections import Mapping
|
||||
+from collections.abc import Mapping
|
||||
|
||||
import networkx as nx
|
||||
from networkx.classes.coreviews import AtlasView, AdjacencyView
|
||||
--- networkx/classes/reportviews.py.orig 2018-09-19 12:30:34.000000000 -0600
|
||||
+++ networkx/classes/reportviews.py 2018-10-30 14:15:16.365203491 -0600
|
||||
@@ -92,7 +92,7 @@ EdgeDataView
|
||||
|
||||
The argument `nbunch` restricts edges to those incident to nodes in nbunch.
|
||||
"""
|
||||
-from collections import Mapping, Set, Iterable
|
||||
+from collections.abc import Mapping, Set, Iterable
|
||||
import networkx as nx
|
||||
|
||||
__all__ = ['NodeView', 'NodeDataView',
|
||||
--- networkx/drawing/nx_pylab.py.orig 2018-09-19 12:30:34.000000000 -0600
|
||||
+++ networkx/drawing/nx_pylab.py 2018-10-30 14:21:36.159610430 -0600
|
||||
@@ -371,7 +371,7 @@ def draw_networkx_nodes(G, pos,
|
||||
draw_networkx_labels()
|
||||
draw_networkx_edge_labels()
|
||||
"""
|
||||
- import collections
|
||||
+ import collections.abc
|
||||
try:
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
@@ -397,7 +397,7 @@ def draw_networkx_nodes(G, pos,
|
||||
except ValueError:
|
||||
raise nx.NetworkXError('Bad value in node positions.')
|
||||
|
||||
- if isinstance(alpha, collections.Iterable):
|
||||
+ if isinstance(alpha, collections.abc.Iterable):
|
||||
node_color = apply_alpha(node_color, alpha, nodelist, cmap, vmin, vmax)
|
||||
alpha = None
|
||||
|
||||
@ -1,14 +1,12 @@
|
||||
%global srcname networkx
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 2.2
|
||||
Release: 3%{?dist}
|
||||
Version: 2.3
|
||||
Release: 1%{?dist}
|
||||
Summary: Creates and Manipulates Graphs and Networks
|
||||
License: BSD
|
||||
URL: http://networkx.github.io/
|
||||
Source0: https://github.com/networkx/networkx/archive/%{srcname}-%{version}.tar.gz
|
||||
# Import from collections.abc as necessary
|
||||
Patch0: %{name}-abc.patch
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
@ -30,6 +28,8 @@ BuildRequires: python3dist(scipy)
|
||||
BuildRequires: python3dist(setuptools)
|
||||
BuildRequires: python3dist(sphinx)
|
||||
BuildRequires: python3dist(sphinx-gallery)
|
||||
BuildRequires: python3dist(sphinx-rtd-theme)
|
||||
BuildRequires: python3dist(texext)
|
||||
BuildRequires: xdg-utils
|
||||
|
||||
# Documentation
|
||||
@ -42,19 +42,18 @@ study of the structure, dynamics, and functions of complex networks.
|
||||
|
||||
%package -n python3-%{srcname}
|
||||
Summary: Creates and Manipulates Graphs and Networks
|
||||
Requires: python3dist(decorator)
|
||||
Requires: python3dist(gdal)
|
||||
Requires: python3dist(lxml)
|
||||
Requires: python3dist(matplotlib)
|
||||
Requires: python3dist(numpy)
|
||||
Requires: python3dist(pandas)
|
||||
Requires: python3dist(pillow)
|
||||
Requires: python3dist(pydot)
|
||||
Requires: python3dist(pygraphviz)
|
||||
Requires: python3dist(pyparsing)
|
||||
Requires: python3dist(pyyaml)
|
||||
Requires: python3dist(scipy)
|
||||
Requires: xdg-utils
|
||||
Recommends: python3dist(gdal)
|
||||
Recommends: python3dist(lxml)
|
||||
Recommends: python3dist(matplotlib)
|
||||
Recommends: python3dist(numpy)
|
||||
Recommends: python3dist(pandas)
|
||||
Recommends: python3dist(pillow)
|
||||
Recommends: python3dist(pydot)
|
||||
Recommends: python3dist(pygraphviz)
|
||||
Recommends: python3dist(pyparsing)
|
||||
Recommends: python3dist(pyyaml)
|
||||
Recommends: python3dist(scipy)
|
||||
Recommends: xdg-utils
|
||||
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
|
||||
@ -78,6 +77,13 @@ Provides: python3-%{srcname}-drawing = %{version}-%{release}
|
||||
NetworkX is a Python 3 package for the creation, manipulation, and
|
||||
study of the structure, dynamics, and functions of complex networks.
|
||||
|
||||
%package -n python3-%{srcname}-test
|
||||
Summary: Test code for NetworkX
|
||||
Requires: python3-%{srcname} = %{version}-%{release}
|
||||
|
||||
%description -n python3-%{srcname}-test
|
||||
This package contains test code for NetworkX. Most users do not need it.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for networkx
|
||||
Provides: bundled(jquery)
|
||||
@ -97,11 +103,9 @@ for f in $(grep -FRl %{_bindir}/env .); do
|
||||
rm $f.orig
|
||||
done
|
||||
|
||||
# Examples that require network access fail on the koji builders, the
|
||||
# sphinx_gallery version of system.out has no attribute named 'buffer', and
|
||||
# the Unix email example has multiple python 3 incompatibilities
|
||||
sed -i "/expected_failing_examples/s|]|,'../examples/graph/plot_football.py','../examples/graph/plot_erdos_renyi.py','../examples/basic/plot_read_write.py'&|" doc/conf.py
|
||||
rm -f examples/drawing/plot_unix_email.py
|
||||
# The football example requires network access, and the parallel betweenness
|
||||
# example has a function that cannot be pickled.
|
||||
sed -i "/expected_failing_examples/s|]|,'../examples/advanced/plot_parallel_betweenness.py','../examples/graph/plot_football.py'&|" doc/conf.py
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
@ -114,10 +118,23 @@ PYTHONPATH=$PWD/build/lib make SPHINXBUILD=sphinx-build-3 -C doc html
|
||||
mv %{buildroot}%{_docdir}/networkx-%{version} ./installed-docs
|
||||
rm -f installed-docs/INSTALL.txt
|
||||
|
||||
# Repack uncompressed zip archives
|
||||
for fil in $(find doc/build -name \*.zip); do
|
||||
mkdir zip
|
||||
cd zip
|
||||
unzip ../$fil
|
||||
zip -9r ../$fil .
|
||||
cd ..
|
||||
rm -fr zip
|
||||
done
|
||||
|
||||
# The tests have shebangs, so mark them as executable
|
||||
grep -rlZ '^#!' %{buildroot}%{python3_sitelib}/networkx | xargs -0 chmod a+x
|
||||
|
||||
# Temporarily disabled until a bug in graphviz > 2.38 is fixed that causes
|
||||
# multigraphs to not work. (Adding the same edge with multiple keys yields
|
||||
# only the initial edge.) This is slated to be fixed in graphviz 2.42. Once
|
||||
# that is built for Fedora, we can reenable the tests.
|
||||
# only the initial edge; see bz 1703571). This is slated to be fixed in
|
||||
# graphviz 2.42. Once that is built for Fedora, we can reenable the tests.
|
||||
#%%check
|
||||
#nosetests-3 -v
|
||||
|
||||
@ -125,11 +142,69 @@ rm -f installed-docs/INSTALL.txt
|
||||
%doc README.rst installed-docs/*
|
||||
%license LICENSE.txt
|
||||
%{python3_sitelib}/networkx*
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/approximation/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/assortativity/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/bipartite/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/centrality/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/coloring/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/community/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/components/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/connectivity/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/flow/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/isomorphism/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/link_analysis/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/node_classification/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/operators/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/shortest_paths/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/traversal/tests/
|
||||
%exclude %{python3_sitelib}/networkx/algorithms/tree/tests/
|
||||
%exclude %{python3_sitelib}/networkx/classes/tests/
|
||||
%exclude %{python3_sitelib}/networkx/drawing/tests/
|
||||
%exclude %{python3_sitelib}/networkx/generators/tests/
|
||||
%exclude %{python3_sitelib}/networkx/linalg/tests/
|
||||
%exclude %{python3_sitelib}/networkx/readwrite/json_graph/tests/
|
||||
%exclude %{python3_sitelib}/networkx/readwrite/tests/
|
||||
%exclude %{python3_sitelib}/networkx/tests/
|
||||
%exclude %{python3_sitelib}/networkx/utils/tests/
|
||||
|
||||
%files -n python3-networkx-test
|
||||
%{python3_sitelib}/networkx/algorithms/approximation/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/assortativity/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/bipartite/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/centrality/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/coloring/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/community/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/components/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/connectivity/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/flow/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/isomorphism/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/link_analysis/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/node_classification/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/operators/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/shortest_paths/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/traversal/tests/
|
||||
%{python3_sitelib}/networkx/algorithms/tree/tests/
|
||||
%{python3_sitelib}/networkx/classes/tests/
|
||||
%{python3_sitelib}/networkx/drawing/tests/
|
||||
%{python3_sitelib}/networkx/generators/tests/
|
||||
%{python3_sitelib}/networkx/linalg/tests/
|
||||
%{python3_sitelib}/networkx/readwrite/json_graph/tests/
|
||||
%{python3_sitelib}/networkx/readwrite/tests/
|
||||
%{python3_sitelib}/networkx/tests/
|
||||
%{python3_sitelib}/networkx/utils/tests/
|
||||
|
||||
%files doc
|
||||
%doc doc/build/html/*
|
||||
|
||||
%changelog
|
||||
* Sat Apr 27 2019 Jerry James <loganjerry@gmail.com> - 2.3-1
|
||||
- New upstream version
|
||||
- Drop upstreamed -abc patch
|
||||
- Add a -test subpackage (bz 1668197)
|
||||
- Convert most Requires to Recommends (bz 1668197)
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (networkx-2.2.tar.gz) = 247ca4d66d33cec86412df846cc1fdbe1cbb0eeee83fb2a9ccdd702eb1453dd7167b397ed77d6b3dfdef6346485160ce75c12be58372238aaf98d334b4c8aeb4
|
||||
SHA512 (networkx-2.3.tar.gz) = c94de6f4804e8972e79d125c59d1a6c2c4287123146696e33ecea677f4d78dd319c025ad343238bd350fd1df1396b06eb6cffd33e6182ec7037a585c8857dbe8
|
||||
|
||||
Loading…
Reference in New Issue
Block a user