From 8a6a3a140c08077672a063e86338f201e264ec3927ef55cd3a2da2f69e2a7451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 1 Apr 2020 09:00:45 +0000 Subject: [PATCH] - Add patch to fix matplotlib deprecation: * matplotlib.patch - Skip two tests that keep failing everywhere OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-networkx?expand=0&rev=16 --- matplotlib.patch | 23 +++++++++++++++++++++++ python-networkx.changes | 7 +++++++ python-networkx.spec | 13 +++++++------ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 matplotlib.patch diff --git a/matplotlib.patch b/matplotlib.patch new file mode 100644 index 0000000..63c304c --- /dev/null +++ b/matplotlib.patch @@ -0,0 +1,23 @@ +From 3987370c957de15249809672933dc06c2fed6fc1 Mon Sep 17 00:00:00 2001 +From: Jarrod Millman +Date: Wed, 30 Oct 2019 05:22:12 -0700 +Subject: [PATCH] Fix matplotlib deprecation (#3697) + +Fixes #3694 +--- + networkx/drawing/tests/test_pylab.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/networkx/drawing/tests/test_pylab.py b/networkx/drawing/tests/test_pylab.py +index 2ecd268d37..0fd3773b06 100644 +--- a/networkx/drawing/tests/test_pylab.py ++++ b/networkx/drawing/tests/test_pylab.py +@@ -172,7 +172,7 @@ def test_multigraph_edgelist_tuples(self): + # See Issue #3295 + G = nx.path_graph(3, create_using=nx.MultiDiGraph) + nx.draw_networkx(G, edgelist=[(0, 1, 0)]) +- nx.draw_networkx(G, edgelist=[(0, 1, 0)], node_size=[10, 20]) ++ nx.draw_networkx(G, edgelist=[(0, 1, 0)], node_size=[10, 20, 0]) + + def test_alpha_iter(self): + pos = nx.random_layout(self.G) diff --git a/python-networkx.changes b/python-networkx.changes index 9d3055d..481ecf0 100644 --- a/python-networkx.changes +++ b/python-networkx.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 1 08:38:55 UTC 2020 - Tomáš Chvátal + +- Add patch to fix matplotlib deprecation: + * matplotlib.patch +- Skip two tests that keep failing everywhere + ------------------------------------------------------------------- Fri Nov 22 00:41:03 UTC 2019 - steven.kowalik@suse.com diff --git a/python-networkx.spec b/python-networkx.spec index 73bae82..8345175 100644 --- a/python-networkx.spec +++ b/python-networkx.spec @@ -1,7 +1,7 @@ # # spec file for package python-networkx # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,16 +23,17 @@ Version: 2.4 Release: 0 Summary: Python package for the study of complex networks License: BSD-3-Clause -Group: Development/Languages/Python URL: https://networkx.github.io/ Source: https://files.pythonhosted.org/packages/source/n/networkx/networkx-%{version}.tar.gz # UPSTREAM PATCH: gh#networkx/networkx#3724 Patch0: numpy-38-test.patch +Patch1: matplotlib.patch BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module decorator >= 3.4.0} -BuildRequires: %{python_module matplotlib} +BuildRequires: %{python_module matplotlib >= 3.1} BuildRequires: %{python_module pydot} BuildRequires: %{python_module pyparsing} +BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest} BuildRequires: %{python_module scipy} BuildRequires: %{python_module setuptools} @@ -41,7 +42,7 @@ BuildRequires: python-rpm-macros BuildRequires: unzip Requires: python-decorator >= 3.4.0 Recommends: python-PyYAML -Recommends: python-matplotlib +Recommends: python-matplotlib >= 3.1 Recommends: python-pydot Recommends: python-pygraphviz Recommends: python-pyparsing @@ -63,7 +64,6 @@ Features: %package -n %{name}-doc Summary: Documentation for %{name} -Group: Documentation/Other Provides: %{python_module networkx-doc = %{version}} %description -n %{name}-doc @@ -102,7 +102,8 @@ popd %check # test excluded because it leads to crashes on i586, gh#networkx/networkx#3304 -%pytest -k 'not test_subgraph_centrality_big_graph' +# TestKatzCentralityDirectedNumpy fails on git master atm too +%pytest -n auto -k 'not test_subgraph_centrality_big_graph and not TestKatzCentralityDirectedNumpy' %files %{python_files} %license LICENSE.txt