diff --git a/0000-New-setting-in-latest-docutils.patch b/0000-New-setting-in-latest-docutils.patch new file mode 100644 index 0000000..81f629a --- /dev/null +++ b/0000-New-setting-in-latest-docutils.patch @@ -0,0 +1,28 @@ +From 3cdc25a10f95549c163fa0b818d0ffd0f4a64470 Mon Sep 17 00:00:00 2001 +From: Randy Barlow +Date: Tue, 7 Mar 2017 21:59:27 -0500 +Subject: [PATCH] New setting in latest docutils + +This patch was originally authored by Marc-Antoine Parent and was +backported for cornice-1.1.0 by Randy Barlow. + +Signed-off-by: Randy Barlow +--- + cornice/ext/sphinxext.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cornice/ext/sphinxext.py b/cornice/ext/sphinxext.py +index ae4f41a..fe00926 100644 +--- a/cornice/ext/sphinxext.py ++++ b/cornice/ext/sphinxext.py +@@ -282,6 +282,7 @@ def rst2node(data): + document.settings.tab_width = 4 + document.settings.pep_references = False + document.settings.rfc_references = False ++ document.settings.character_level_inline_markup = False + document.settings.env = Env() + parser.parse(data, document) + if len(document.children) == 1: +-- +2.12.0 + diff --git a/0001-Initialize-the-ref_context-as-a-dictionary.patch b/0001-Initialize-the-ref_context-as-a-dictionary.patch new file mode 100644 index 0000000..c2bb852 --- /dev/null +++ b/0001-Initialize-the-ref_context-as-a-dictionary.patch @@ -0,0 +1,27 @@ +From 1f10b0b937eeb28adced360d4fa2ca76e4fe9191 Mon Sep 17 00:00:00 2001 +From: Randy Barlow +Date: Tue, 7 Mar 2017 22:03:10 -0500 +Subject: [PATCH] Initialize the ref_context as a dictionary. + +fixes #7 + +Signed-off-by: Randy Barlow +--- + cornice/ext/sphinxext.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cornice/ext/sphinxext.py b/cornice/ext/sphinxext.py +index fe00926..b00fb44 100644 +--- a/cornice/ext/sphinxext.py ++++ b/cornice/ext/sphinxext.py +@@ -284,6 +284,7 @@ def rst2node(data): + document.settings.rfc_references = False + document.settings.character_level_inline_markup = False + document.settings.env = Env() ++ document.settings.env.ref_context = {} + parser.parse(data, document) + if len(document.children) == 1: + return document.children[0] +-- +2.12.0 + diff --git a/python-cornice.spec b/python-cornice.spec index 1d8ace0..e05d1e1 100644 --- a/python-cornice.spec +++ b/python-cornice.spec @@ -19,11 +19,16 @@ Name: python-cornice Summary: Define Web Services in Pyramid Version: 1.1.0 -Release: 5%{?dist} +Release: 6%{?dist} License: MPLv2.0 URL: https://pypi.python.org/pypi/cornice Source0: https://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz +# https://github.com/Cornices/cornice.ext.sphinx/pull/5 +Patch0: 0000-New-setting-in-latest-docutils.patch +# https://github.com/Cornices/cornice.ext.sphinx/pull/9 +Patch1: 0001-Initialize-the-ref_context-as-a-dictionary.patch + # This file is missing from the tarball # https://github.com/mozilla-services/cornice/pull/240 @@ -109,6 +114,9 @@ Generate documentation for Web Services. %prep %setup -q -n %{module}-%{version} +%patch0 -p1 +%patch1 -p1 + # This file is missing from the tarball # https://github.com/mozilla-services/cornice/pull/240 cp -p %{SOURCE1} ./cornice/tests/ext/ @@ -172,6 +180,9 @@ popd %changelog +* Tue Mar 07 2017 Randy Barlow - 1.1.0-6 +- Apply two patches to allow autodoc generation to work again (#1430185, #1430186). + * Sat Feb 11 2017 Fedora Release Engineering - 1.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild