diff --git a/920200bfa32ed99637a7df12695e07f60180ff3c.patch b/920200bfa32ed99637a7df12695e07f60180ff3c.patch new file mode 100644 index 0000000..1735728 --- /dev/null +++ b/920200bfa32ed99637a7df12695e07f60180ff3c.patch @@ -0,0 +1,34 @@ +From 920200bfa32ed99637a7df12695e07f60180ff3c Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev +Date: Tue, 3 Oct 2017 22:28:04 +0700 +Subject: [PATCH] Set refdomain for refnodes to fix build with Sphinx 1.6.3 + +Otherwise the documentation build fails with: + +Traceback (most recent call last): + [...] + File "/usr/lib/python2.7/dist-packages/sphinx/environment/__init__.py", line 730, in read_doc + domain.process_doc(self, docname, doctree) + File "/usr/lib/python2.7/dist-packages/sphinx/domains/std.py", line 576, in process_doc + self.note_citation_refs(env, docname, document) + File "/usr/lib/python2.7/dist-packages/sphinx/domains/std.py", line 593, in note_citation_refs + if node['refdomain'] == 'std' and node['reftype'] == 'citation': + File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 567, in __getitem__ + return self.attributes[key] +KeyError: 'refdomain' +--- + sphinxcontrib/issuetracker/__init__.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sphinxcontrib/issuetracker/__init__.py b/sphinxcontrib/issuetracker/__init__.py +index 56b15d2..0bd4959 100644 +--- a/sphinxcontrib/issuetracker/__init__.py ++++ b/sphinxcontrib/issuetracker/__init__.py +@@ -158,6 +158,7 @@ def apply(self): + issue_id = match.group(1) + # turn the issue reference into a reference node + refnode = pending_xref() ++ refnode['refdomain'] = None + refnode['reftarget'] = issue_id + refnode['reftype'] = 'issue' + refnode['trackerconfig'] = tracker_config diff --git a/python-sphinxcontrib-issuetracker.spec b/python-sphinxcontrib-issuetracker.spec index ae12fc7..05bc8f1 100644 --- a/python-sphinxcontrib-issuetracker.spec +++ b/python-sphinxcontrib-issuetracker.spec @@ -8,13 +8,16 @@ Name: python-%{pyname} Version: 0.11 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Sphinx integration with different issue trackers License: BSD URL: https://pypi.python.org/pypi/%{pyname} Source0: https://pypi.python.org/packages/source/s/%{pyname}/%{pyname}-%{version}.tar.gz +# https://github.com/ignatenkobrain/sphinxcontrib-issuetracker/pull/13 +Patch1: 920200bfa32ed99637a7df12695e07f60180ff3c.patch + BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-requests @@ -84,6 +87,7 @@ This package contains the Python 3 version of the module. %prep %setup -q -n %{pyname}-%{version} +%patch1 -p1 rm -rf *egg-info %if 0%{?with_python3} @@ -135,6 +139,9 @@ popd %changelog +* Fri Dec 08 2017 Dan Callaghan - 0.11-10 +- Fix KeyError: 'refdomain' with latest Sphinx (RHBZ#1523462) + * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.11-9 - Python 2 binary package renamed to python2-sphinxcontrib-issuetracker See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3