From cc84824fdce5bfcfa986b2de463366eca1d3405d Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 26 Jan 2021 17:53:39 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/python-networkx.git#d98bb9082bf8f6c13bdba7141cae39719f92f4d5 --- python-networkx-pyyaml.patch | 9 +++++++++ python-networkx.spec | 33 +++++++++------------------------ 2 files changed, 18 insertions(+), 24 deletions(-) create mode 100644 python-networkx-pyyaml.patch diff --git a/python-networkx-pyyaml.patch b/python-networkx-pyyaml.patch new file mode 100644 index 0000000..c5fcb3b --- /dev/null +++ b/python-networkx-pyyaml.patch @@ -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 diff --git a/python-networkx.spec b/python-networkx.spec index dfc29f0..97ae8ef 100644 --- a/python-networkx.spec +++ b/python-networkx.spec @@ -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 @@ -17,11 +20,6 @@ BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} %if 0%{?rhel} == 0 -BuildRequires: fontawesome-fonts-web -BuildRequires: font(fontawesome) -BuildRequires: font(lato) -BuildRequires: font(robotoslab) -BuildRequires: fontconfig BuildRequires: python3-docs BuildRequires: python3-numpy-doc BuildRequires: %{py3_dist decorator} @@ -80,7 +78,6 @@ study of the structure, dynamics, and functions of complex networks. %if 0%{?rhel} == 0 %package doc Summary: Documentation for networkx -Requires: fontawesome-fonts-web Requires: font(fontawesome) Requires: font(lato) Requires: font(robotoslab) @@ -104,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 @@ -115,21 +112,6 @@ sed -e "s|'https://docs\.python\.org/2/': None|'https://docs.python.org/': '%{_d # Build the documentation PYTHONPATH=$PWD/build/lib make -C doc html rst2html --no-datestamp README.rst README.html - -# Do not bundle fonts into the documentation -cd doc/build/html/_static/fonts -for suffix in eot svg ttf woff woff2; do - rm fontawesome-webfont.$suffix - ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.$suffix . -done -rm {Lato,RobotoSlab}/*.ttf -ln -s $(fc-match -f "%%{file}" "lato:bold") Lato/lato-bold.ttf -ln -s $(fc-match -f "%%{file}" "lato:bold:italic") Lato/lato-bolditalic.ttf -ln -s $(fc-match -f "%%{file}" "lato:italic") Lato/lato-italic.ttf -ln -s $(fc-match -f "%%{file}" "lato") Lato/lato-regular.ttf -ln -s $(fc-match -f "%%{file}" "robotoslab:bold") RobotoSlab/roboto-slab-v7-bold.ttf -ln -s $(fc-match -f "%%{file}" "robotoslab") RobotoSlab/roboto-slab-v7-regular.ttf -cd - %endif %install @@ -167,6 +149,9 @@ pytest %endif %changelog +* Tue Jan 26 2021 Jerry James - 2.5-3 +- Add -pyyaml patch to fix FTBFS + * Fri Dec 11 2020 Petr Lautrbach - 2.5-2 - Limit BuildRequires to necessary minimum in Red Hat Enterprise Linux - Skip pytest in Red Hat Enterprise Linux