forked from pool/python-networkx
Accepting request 750202 from devel:languages:python:numeric
- Drop incorrectly calculated dependency on python33 - Switch to using %pytest macro - Update to version 2.4 Highlights: * Remove deprecated code from 1.x * Support for Python 3.8 * Switched to pytest for testing * Last release to support Python 3.5 * Fifteen new fuctions, including onion decomposition and linear prufing * Three new generators, such as a directed joint degree generator - Add numpy-38-test.patch, to correct test failure under Python 3.8 - Update URL, upstream changed to tarballs from zipfiles. OBS-URL: https://build.opensuse.org/request/show/750202 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-networkx?expand=0&rev=19
This commit is contained in:
commit
e1a374d1ba
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8311ddef63cf5c5c5e7c1d0212dd141d9a1fe3f474915281b73597ed5f1d4e3d
|
|
||||||
size 1743914
|
|
3
networkx-2.4.tar.gz
Normal file
3
networkx-2.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f8f4ff0b6f96e4f9b16af6b84622597b5334bf9cae8cf9b2e42e7985d5c95c64
|
||||||
|
size 1462338
|
69
numpy-38-test.patch
Normal file
69
numpy-38-test.patch
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
diff --git a/networkx/readwrite/tests/test_gexf.py b/networkx/readwrite/tests/test_gexf.py
|
||||||
|
index afc40111..f16504c0 100644
|
||||||
|
--- a/networkx/readwrite/tests/test_gexf.py
|
||||||
|
+++ b/networkx/readwrite/tests/test_gexf.py
|
||||||
|
@@ -404,7 +404,8 @@ gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd" version="1.2">
|
||||||
|
nx.set_node_attributes(G, {n: n for n in numpy.arange(4)}, 'number')
|
||||||
|
G[0][1]['edge-number'] = numpy.float64(1.1)
|
||||||
|
|
||||||
|
- expected = """<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft"\
|
||||||
|
+ if sys.version_info < (3, 8):
|
||||||
|
+ expected = """<gexf version="1.2" xmlns="http://www.gexf.net/1.2draft"\
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation\
|
||||||
|
="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd">
|
||||||
|
<meta lastmodifieddate="{}">
|
||||||
|
@@ -449,6 +450,54 @@ gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd" version="1.2">
|
||||||
|
<edge id="2" source="2" target="3" />
|
||||||
|
</edges>
|
||||||
|
</graph>
|
||||||
|
+</gexf>""".format(time.strftime('%Y-%m-%d'), nx.__version__)
|
||||||
|
+ else:
|
||||||
|
+ expected = """<gexf xmlns="http://www.gexf.net/1.2draft"\
|
||||||
|
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation\
|
||||||
|
+="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd"\
|
||||||
|
+ version="1.2">
|
||||||
|
+ <meta lastmodifieddate="{}">
|
||||||
|
+ <creator>NetworkX {}</creator>
|
||||||
|
+ </meta>
|
||||||
|
+ <graph defaultedgetype="undirected" mode="static" name="">
|
||||||
|
+ <attributes mode="static" class="edge">
|
||||||
|
+ <attribute id="1" title="edge-number" type="float" />
|
||||||
|
+ </attributes>
|
||||||
|
+ <attributes mode="static" class="node">
|
||||||
|
+ <attribute id="0" title="number" type="int" />
|
||||||
|
+ </attributes>
|
||||||
|
+ <nodes>
|
||||||
|
+ <node id="0" label="0">
|
||||||
|
+ <attvalues>
|
||||||
|
+ <attvalue for="0" value="0" />
|
||||||
|
+ </attvalues>
|
||||||
|
+ </node>
|
||||||
|
+ <node id="1" label="1">
|
||||||
|
+ <attvalues>
|
||||||
|
+ <attvalue for="0" value="1" />
|
||||||
|
+ </attvalues>
|
||||||
|
+ </node>
|
||||||
|
+ <node id="2" label="2">
|
||||||
|
+ <attvalues>
|
||||||
|
+ <attvalue for="0" value="2" />
|
||||||
|
+ </attvalues>
|
||||||
|
+ </node>
|
||||||
|
+ <node id="3" label="3">
|
||||||
|
+ <attvalues>
|
||||||
|
+ <attvalue for="0" value="3" />
|
||||||
|
+ </attvalues>
|
||||||
|
+ </node>
|
||||||
|
+ </nodes>
|
||||||
|
+ <edges>
|
||||||
|
+ <edge source="0" target="1" id="0">
|
||||||
|
+ <attvalues>
|
||||||
|
+ <attvalue for="1" value="1.1" />
|
||||||
|
+ </attvalues>
|
||||||
|
+ </edge>
|
||||||
|
+ <edge source="1" target="2" id="1" />
|
||||||
|
+ <edge source="2" target="3" id="2" />
|
||||||
|
+ </edges>
|
||||||
|
+ </graph>
|
||||||
|
</gexf>""".format(time.strftime('%Y-%m-%d'), nx.__version__)
|
||||||
|
obtained = '\n'.join(nx.generate_gexf(G))
|
||||||
|
assert expected == obtained
|
@ -1,3 +1,23 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 22 00:41:03 UTC 2019 - steven.kowalik@suse.com
|
||||||
|
|
||||||
|
- Drop incorrectly calculated dependency on python33
|
||||||
|
- Switch to using %pytest macro
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Nov 17 23:53:12 UTC 2019 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to version 2.4
|
||||||
|
Highlights:
|
||||||
|
* Remove deprecated code from 1.x
|
||||||
|
* Support for Python 3.8
|
||||||
|
* Switched to pytest for testing
|
||||||
|
* Last release to support Python 3.5
|
||||||
|
* Fifteen new fuctions, including onion decomposition and linear prufing
|
||||||
|
* Three new generators, such as a directed joint degree generator
|
||||||
|
- Add numpy-38-test.patch, to correct test failure under Python 3.8
|
||||||
|
- Update URL, upstream changed to tarballs from zipfiles.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 23 17:28:58 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
Tue Jul 23 17:28:58 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-networkx
|
# spec file for package python-networkx
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,19 +19,21 @@
|
|||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-networkx
|
Name: python-networkx
|
||||||
Version: 2.3
|
Version: 2.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python package for the study of complex networks
|
Summary: Python package for the study of complex networks
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://networkx.github.io/
|
URL: https://networkx.github.io/
|
||||||
Source: https://files.pythonhosted.org/packages/source/n/networkx/networkx-%{version}.zip
|
Source: https://files.pythonhosted.org/packages/source/n/networkx/networkx-%{version}.tar.gz
|
||||||
|
# UPSTREAM PATCH: gh#networkx/networkx#3724
|
||||||
|
Patch0: numpy-38-test.patch
|
||||||
BuildRequires: %{python_module PyYAML}
|
BuildRequires: %{python_module PyYAML}
|
||||||
BuildRequires: %{python_module decorator >= 3.4.0}
|
BuildRequires: %{python_module decorator >= 3.4.0}
|
||||||
BuildRequires: %{python_module matplotlib}
|
BuildRequires: %{python_module matplotlib}
|
||||||
BuildRequires: %{python_module nose >= 0.10.1}
|
|
||||||
BuildRequires: %{python_module pydot}
|
BuildRequires: %{python_module pydot}
|
||||||
BuildRequires: %{python_module pyparsing}
|
BuildRequires: %{python_module pyparsing}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module scipy}
|
BuildRequires: %{python_module scipy}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -69,6 +71,7 @@ Documentation and examples for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n networkx-%{version}
|
%setup -q -n networkx-%{version}
|
||||||
|
%autopatch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -86,7 +89,8 @@ fi
|
|||||||
|
|
||||||
%{python_expand pushd %{buildroot}%{$python_sitelib}
|
%{python_expand pushd %{buildroot}%{$python_sitelib}
|
||||||
# Fix wrong-script-interpreter
|
# Fix wrong-script-interpreter
|
||||||
find networkx -name '*test*.py' -exec sed -i "s|#!%{_bindir}/env python|#!%__$python|" {} +
|
find networkx -name '*test*.py' -exec sed -i "s|#!%{_bindir}/env python$|#!%__$python|" {} +
|
||||||
|
find networkx -name '*test*.py' -exec sed -i "s|#!%{_bindir}/env python3$|#!%__$python|" {} +
|
||||||
find networkx -name '*test*.py' -exec grep -q '#!%__$python' {} \; -exec chmod a+x {} +
|
find networkx -name '*test*.py' -exec grep -q '#!%__$python' {} \; -exec chmod a+x {} +
|
||||||
# Deduplicating files can generate a RPMLINT warning for pyc mtime
|
# Deduplicating files can generate a RPMLINT warning for pyc mtime
|
||||||
find networkx -name '*test*.py' -exec $python -m compileall -d %{$python_sitelib} {} \;
|
find networkx -name '*test*.py' -exec $python -m compileall -d %{$python_sitelib} {} \;
|
||||||
@ -98,7 +102,7 @@ popd
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
# test excluded because it leads to crashes on i586, gh#networkx/networkx#3304
|
# test excluded because it leads to crashes on i586, gh#networkx/networkx#3304
|
||||||
%python_exec setup.py nosetests -v -e 'test_subgraph_centrality_big_graph'
|
%pytest -k 'not test_subgraph_centrality_big_graph'
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user