Add -abc patch to quiet warnings.
This commit is contained in:
parent
f48b7301a4
commit
34145c0ec4
77
python-networkx-abc.patch
Normal file
77
python-networkx-abc.patch
Normal file
@ -0,0 +1,77 @@
|
||||
--- 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
|
||||
|
||||
@ -2,11 +2,13 @@
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 2.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?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
|
||||
@ -84,7 +86,7 @@ Provides: bundled(jquery)
|
||||
Documentation for networkx
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{srcname}-%{version}
|
||||
%autosetup -p0 -n %{srcname}-%{srcname}-%{version}
|
||||
|
||||
# Do not use env
|
||||
for f in $(grep -FRl %{_bindir}/env .); do
|
||||
@ -128,6 +130,9 @@ rm -f installed-docs/INSTALL.txt
|
||||
%doc doc/build/html/*
|
||||
|
||||
%changelog
|
||||
* Tue Oct 30 2018 Jerry James <loganjerry@gmail.com> - 2.2-2
|
||||
- Add -abc patch to quiet warnings
|
||||
|
||||
* Sat Oct 13 2018 Jerry James <loganjerry@gmail.com> - 2.2-1
|
||||
- New upstream version (bz 1600361)
|
||||
- Drop all patches
|
||||
|
||||
Loading…
Reference in New Issue
Block a user