diff --git a/python-networkx.spec b/python-networkx.spec index 9f5cc0f..a0d65ba 100644 --- a/python-networkx.spec +++ b/python-networkx.spec @@ -21,6 +21,7 @@ Source1: http://networkx.github.io/documentation/latest/_downloads/networ 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 BuildArch: noarch Requires: %{name}-core = %{version}-%{release} @@ -165,6 +166,7 @@ Documentation for networkx %prep %setup -q -n networkx-%{version} %patch0 -p1 +%patch1 -p1 # Fix permissions find examples -type f -perm /0111 | xargs chmod a-x diff --git a/test-rounding-fix.patch b/test-rounding-fix.patch new file mode 100644 index 0000000..a643595 --- /dev/null +++ b/test-rounding-fix.patch @@ -0,0 +1,14 @@ +This was seen intermittently + +diff -Naur networkx-1.8.1.orig/networkx/algorithms/assortativity/correlation.py networkx-1.8.1/networkx/algorithms/assortativity/correlation.py +--- networkx-1.8.1.orig/networkx/algorithms/assortativity/correlation.py 2013-08-04 13:53:31.000000000 +0000 ++++ networkx-1.8.1/networkx/algorithms/assortativity/correlation.py 2014-03-17 11:11:25.710772149 +0000 +@@ -115,7 +115,7 @@ + -------- + >>> G=nx.path_graph(4) + >>> r=nx.degree_pearson_correlation_coefficient(G) +- >>> r ++ >>> print("%.1f"%r) + -0.5 + + Notes