diff --git a/0001-doc-use-add_object_type-instead-of-deprecated-add_de.patch b/0001-doc-use-add_object_type-instead-of-deprecated-add_de.patch new file mode 100644 index 0000000..b1df15e --- /dev/null +++ b/0001-doc-use-add_object_type-instead-of-deprecated-add_de.patch @@ -0,0 +1,30 @@ +From 8af04cf9a996eabdae67258e8b0590341ddc4971 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Thu, 4 Apr 2019 16:47:47 +0200 +Subject: [PATCH] doc: use add_object_type() instead of deprecated + add_description_unit() + +This is necessary to build the docs with sphinx-2.x. + +sphinx-2.0 removed the deprecated function. +See https://bugs.python.org/issue34967 for similar changes in cpython. +--- + doc/source/conf.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/doc/source/conf.py b/doc/source/conf.py +index 07e67378c0..230bbdcbef 100644 +--- a/doc/source/conf.py ++++ b/doc/source/conf.py +@@ -190,7 +190,7 @@ def parse_event(env, sig, signode): + def setup(app): + from sphinx.ext.autodoc import cut_lines + app.connect('autodoc-process-docstring', cut_lines(4, what=['module'])) +- app.add_description_unit('directive', 'dir', 'pair: %s; directive', parse_directive) +- app.add_description_unit('role', 'role', 'pair: %s; role', parse_role) +- app.add_description_unit('confval', 'confval', 'pair: %s; configuration value') +- app.add_description_unit('event', 'event', 'pair: %s; event', parse_event) ++ app.add_object_type('directive', 'dir', 'pair: %s; directive', parse_directive) ++ app.add_object_type('role', 'role', 'pair: %s; role', parse_role) ++ app.add_object_type('confval', 'confval', 'pair: %s; configuration value') ++ app.add_object_type('event', 'event', 'pair: %s; event', parse_event) diff --git a/pygraphviz-swig.patch b/pygraphviz-swig.patch index 400fb33..8fc7f6d 100644 --- a/pygraphviz-swig.patch +++ b/pygraphviz-swig.patch @@ -1,5 +1,5 @@ ---- pygraphviz/graphviz.i.orig 2018-09-10 16:07:12.000000000 -0600 -+++ pygraphviz/graphviz.i 2018-10-11 11:11:44.010380342 -0600 +--- a/pygraphviz/graphviz.i.orig 2018-09-10 16:07:12.000000000 -0600 ++++ b/pygraphviz/graphviz.i 2018-10-11 11:11:44.010380342 -0600 @@ -162,7 +162,7 @@ int agisstrict(Agraph_t * g); /* nodes */ diff --git a/python-pygraphviz.spec b/python-pygraphviz.spec index a92315e..ec6ced7 100644 --- a/python-pygraphviz.spec +++ b/python-pygraphviz.spec @@ -1,6 +1,6 @@ Name: python-pygraphviz Version: 1.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Create and Manipulate Graphs and Networks License: BSD URL: http://networkx.lanl.gov/pygraphviz/ @@ -9,6 +9,9 @@ Source0: https://github.com/pygraphviz/pygraphviz/archive/pygraphviz-%{ve # https://github.com/pygraphviz/pygraphviz Patch0: pygraphviz-swig.patch +# https://github.com/pygraphviz/pygraphviz/pull/191 +Patch0001: 0001-doc-use-add_object_type-instead-of-deprecated-add_de.patch + BuildRequires: gcc BuildRequires: python3-devel BuildRequires: python3dist(setuptools) @@ -42,7 +45,7 @@ BuildArch: noarch Documentation for PyGraphViz. %prep -%autosetup -p0 -n pygraphviz-pygraphviz-%{version} +%autosetup -p1 -n pygraphviz-pygraphviz-%{version} # Regenerate the swig-generated files swig -python pygraphviz/graphviz.i @@ -85,6 +88,9 @@ chmod g-w %{buildroot}%{python3_sitearch}/pygraphviz/_graphviz.*.so %license LICENSE %changelog +* Thu Apr 4 2019 Zbigniew Jędrzejewski-Szmek - 1.5-4 +- Fix build under sphinx 2.x (#1696133) + * Sun Feb 17 2019 Zbigniew Jędrzejewski-Szmek - 1.5-3 - Restore the tests subpackage (#1677978)