Add -pyyaml patch to fix FTBFS.
This commit is contained in:
parent
fb96ce1fef
commit
d98bb9082b
9
python-networkx-pyyaml.patch
Normal file
9
python-networkx-pyyaml.patch
Normal file
@ -0,0 +1,9 @@
|
||||
--- networkx/readwrite/nx_yaml.py.orig 2020-08-22 14:01:28.000000000 -0600
|
||||
+++ networkx/readwrite/nx_yaml.py 2021-01-26 10:02:43.555537204 -0700
|
||||
@@ -88,5 +88,5 @@ def read_yaml(path):
|
||||
except ImportError as e:
|
||||
raise ImportError("read_yaml() requires PyYAML: http://pyyaml.org/") from e
|
||||
|
||||
- G = yaml.load(path, Loader=yaml.FullLoader)
|
||||
+ G = yaml.load(path, Loader=yaml.Loader)
|
||||
return G
|
||||
@ -2,13 +2,16 @@
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 2.5
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?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
|
||||
# The football example requires network access, so expect it to fail.
|
||||
Patch0: %{name}-doc.patch
|
||||
# PyYAML 5.4+ breaks reading yaml files
|
||||
# https://github.com/networkx/networkx/commit/a6dd458a12ad8db161271e2271644803d4f29a96
|
||||
Patch1: %{name}-pyyaml.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -98,8 +101,8 @@ for f in $(grep -FRl %{_bindir}/env .); do
|
||||
done
|
||||
|
||||
# Use local objects.inv for intersphinx
|
||||
sed -e "s|'https://docs\.python\.org/2/': None|'https://docs.python.org/': '%{_docdir}/python3-docs/html/objects.inv'|" \
|
||||
-e "s|\('https://docs\.scipy\.org/doc/numpy/': \)None|\1'%{_docdir}/python3-numpy-doc/objects.inv'|" \
|
||||
sed -e 's|\("https://docs\.python\.org/3/": \)None|\1"%{_docdir}/python3-docs/html/objects.inv"|' \
|
||||
-e 's|\("https://numpy\.org/doc/stable/": \)None|\1"%{_docdir}/python3-numpy-doc/objects.inv"|' \
|
||||
-i doc/conf.py
|
||||
|
||||
%build
|
||||
@ -146,6 +149,9 @@ pytest
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jan 26 2021 Jerry James <loganjerry@gmail.com> - 2.5-3
|
||||
- Add -pyyaml patch to fix FTBFS
|
||||
|
||||
* Fri Dec 11 2020 Petr Lautrbach <plautrba@redhat.com> - 2.5-2
|
||||
- Limit BuildRequires to necessary minimum in Red Hat Enterprise Linux
|
||||
- Skip pytest in Red Hat Enterprise Linux
|
||||
|
||||
Loading…
Reference in New Issue
Block a user