From ed4b10d16c8ef6729275e5789363f0dc0f89fea8aac36a884da489571c9dd836 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 11 Jul 2013 15:02:12 +0000 Subject: [PATCH] Accepting request 182659 from home:dirkmueller:branches:devel:languages:python - add sphinx-docutils-0.10.patch: * add support for docutils 0.10 OBS-URL: https://build.opensuse.org/request/show/182659 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=32 --- python-Sphinx.changes | 6 ++++++ python-Sphinx.spec | 2 ++ sphinx-docutils-0.10.patch | 28 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 sphinx-docutils-0.10.patch diff --git a/python-Sphinx.changes b/python-Sphinx.changes index 1a2c05e..71c6d19 100644 --- a/python-Sphinx.changes +++ b/python-Sphinx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jul 9 14:16:18 UTC 2013 - dmueller@suse.com + +- add sphinx-docutils-0.10.patch: + * add support for docutils 0.10 + ------------------------------------------------------------------- Thu May 16 10:33:17 UTC 2013 - speilicke@suse.com diff --git a/python-Sphinx.spec b/python-Sphinx.spec index 68ce4a2..02978f5 100644 --- a/python-Sphinx.spec +++ b/python-Sphinx.spec @@ -24,6 +24,7 @@ Summary: Python documentation generator License: BSD-2-Clause Group: Development/Languages/Python Source: http://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz +Patch0: sphinx-docutils-0.10.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel BuildRequires: python-distribute @@ -79,6 +80,7 @@ and translating suite, the Docutils. %prep %setup -q -n Sphinx-%{version} +%patch0 -p1 sed -i '/#\!/d' sphinx/pycode/pgen2/token.py # Fix non-excutable-script warning # Add Interpreter version suffix to entrypoints (and thus /usr/bin binaries) to # allow for update-alternatives later on: diff --git a/sphinx-docutils-0.10.patch b/sphinx-docutils-0.10.patch new file mode 100644 index 0000000..9253185 --- /dev/null +++ b/sphinx-docutils-0.10.patch @@ -0,0 +1,28 @@ +diff -up Sphinx-1.1.3/sphinx/writers/manpage.py.bak Sphinx-1.1.3/sphinx/writers/manpage.py +--- Sphinx-1.1.3/sphinx/writers/manpage.py.bak 2011-11-01 00:38:44.000000000 -0700 ++++ Sphinx-1.1.3/sphinx/writers/manpage.py 2012-08-21 12:38:33.380808202 -0700 +@@ -72,6 +72,11 @@ class ManualPageTranslator(BaseTranslato + # since self.append_header() is never called, need to do this here + self.body.append(MACRO_DEF) + ++ # Overwrite admonition label translations with our own ++ for label, translation in admonitionlabels.items(): ++ self.language.labels[label] = self.deunicode(translation) ++ ++ + # overwritten -- added quotes around all .TH arguments + def header(self): + tmpl = (".TH \"%(title_upper)s\" \"%(manual_section)s\"" +@@ -193,12 +198,6 @@ class ManualPageTranslator(BaseTranslato + def depart_seealso(self, node): + self.depart_admonition(node) + +- # overwritten -- use our own label translations +- def visit_admonition(self, node, name=None): +- if name: +- self.body.append('.IP %s\n' % +- self.deunicode(admonitionlabels.get(name, name))) +- + def visit_productionlist(self, node): + self.ensure_eol() + names = []