diff --git a/python-Sphinx.changes b/python-Sphinx.changes index 09709a9..ca88460 100644 --- a/python-Sphinx.changes +++ b/python-Sphinx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Nov 13 14:54:09 UTC 2013 - speilicke@suse.com + +- Add sphinx-setup_command_unicode.patch: Backport of + https://bitbucket.org/birkenfeld/sphinx/pull-request/193/ + ------------------------------------------------------------------- Wed Nov 6 08:10:01 UTC 2013 - speilicke@suse.com diff --git a/python-Sphinx.spec b/python-Sphinx.spec index fc0ce02..bfb6e74 100644 --- a/python-Sphinx.spec +++ b/python-Sphinx.spec @@ -24,6 +24,8 @@ 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 +# PATCH-FIX-UPSTREAM speilicke@suse.com -- Backport of https://bitbucket.org/birkenfeld/sphinx/pull-request/193/ +Patch0: sphinx-setup_command_unicode.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel BuildRequires: python-setuptools @@ -78,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-setup_command_unicode.patch b/sphinx-setup_command_unicode.patch new file mode 100644 index 0000000..c9f9a6f --- /dev/null +++ b/sphinx-setup_command_unicode.patch @@ -0,0 +1,31 @@ +diff -r 86e59496553b sphinx/setup_command.py +--- a/sphinx/setup_command.py Tue Nov 12 15:17:09 2013 +0000 ++++ b/sphinx/setup_command.py Wed Nov 13 15:41:12 2013 +0100 +@@ -14,6 +14,7 @@ + + import sys + import os ++import types + from StringIO import StringIO + from distutils.cmd import Command + +@@ -98,6 +99,19 @@ + return root + return None + ++ # Overriding distutils' Command._ensure_stringlike which doesn't support ++ # unicode, causing finalize_options to fail if invoked again. Workaround ++ # for http://bugs.python.org/issue19570 ++ def _ensure_stringlike(self, option, what, default=None): ++ val = getattr(self, option) ++ if val is None: ++ setattr(self, option, default) ++ return default ++ elif not isinstance(val, types.StringTypes): ++ raise DistutilsOptionError("'%s' must be a %s (got `%s`)" ++ % (option, what, val)) ++ return val ++ + def finalize_options(self): + if self.source_dir is None: + self.source_dir = self._guess_source_dir()