[python-docutils] PyXML patch from upstream
Toshio くらとみ
toshio at fedoraproject.org
Tue Aug 14 16:14:28 UTC 2012
commit 53adf257e2f480a5f28b0292dd8da00a5d24fb5f
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Tue Aug 14 09:14:19 2012 -0700
PyXML patch from upstream
- Fix ability to disable python3 builds
docutils-0.9.1-pyxml-upstream.patch | 23 +++++++++++++++++++++++
docutils-0.9.1-pyxml.patch | 18 ------------------
python-docutils.spec | 11 +++++++++--
3 files changed, 32 insertions(+), 20 deletions(-)
---
diff --git a/docutils-0.9.1-pyxml-upstream.patch b/docutils-0.9.1-pyxml-upstream.patch
new file mode 100644
index 0000000..27df368
--- /dev/null
+++ b/docutils-0.9.1-pyxml-upstream.patch
@@ -0,0 +1,23 @@
+diff -up docutils-0.10/docutils/writers/docutils_xml.py.bak docutils-0.10/docutils/writers/docutils_xml.py
+--- docutils-0.10/docutils/writers/docutils_xml.py.bak 2012-07-30 20:57:20.000000000 -0700
++++ docutils-0.10/docutils/writers/docutils_xml.py 2012-08-14 07:51:20.389219183 -0700
+@@ -11,6 +11,19 @@ http://docutils.sourceforge.net/docs/ref
+ __docformat__ = 'reStructuredText'
+
+ import sys
++
++# Work around broken PyXML and obsolete python stdlib behaviour (The
++# stdlib replaces its own xml module with the unmaintained PyXML if PyXML
++# is installed.) Reverse the order in which xml module and submodules are
++# searched to import stdlib modules if they exist and PyXML modules if they
++# do not exist in the stdlib.
++#
++# See http://sourceforge.net/tracker/index.php?func=detail&aid=3552403&group_id=38414&atid=422030
++# and http://lists.fedoraproject.org/pipermail/python-devel/2012-July/000406.html
++import xml
++if "_xmlplus" in xml.__path__[0]: # PyXML sub-module
++ xml.__path__.reverse() # If both are available, prefer stdlib over PyXML
++
+ import xml.sax.saxutils
+ from StringIO import StringIO
+
diff --git a/python-docutils.spec b/python-docutils.spec
index f2be447..92a3e4e 100644
--- a/python-docutils.spec
+++ b/python-docutils.spec
@@ -11,7 +11,7 @@
Name: python-%{srcname}
Version: 0.10
-Release: 0.2.20120730svn7490%{?dist}
+Release: 0.3.20120730svn7490%{?dist}
Summary: System for processing plaintext documentation
Group: Development/Languages
@@ -25,7 +25,8 @@ URL: http://docutils.sourceforge.net
# python setup.py sdist
# The tarball is in dist/docutils-VERSION.tar.gz
Source0: %{srcname}-%{version}.tar.gz
-Patch0: docutils-0.9.1-pyxml.patch
+# Upstream provided patch for pyxml issue
+Patch0: docutils-0.9.1-pyxml-upstream.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -153,13 +154,19 @@ rm -rf %{buildroot}
%{_bindir}/*
%{python_sitelib}/*
+%if 0%{?with_python3}
%files -n python3-%{srcname}
%defattr(-,root,root,-)
%doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
%doc THANKS.txt licenses docs tools/editors
%{python3_sitelib}/*
+%endif
%changelog
+* Tue Aug 14 2012 Toshio Kuratomi <toshio at fedoraproject.org> - 0.10-0.3.20120730svn7490
+- PyXML patch from upstream
+- Fix ability to disable python3 builds
+
* Fri Aug 3 2012 David Malcolm <dmalcolm at redhat.com> - 0.10-0.2.20120730svn7490
- remove rhel logic from with_python3 conditional
More information about the scm-commits
mailing list