Fix building on py3.2 using a workaround
This commit is contained in:
parent
6142df8bb6
commit
23dfe039f1
49
docutils-py3.2-configparser.patch
Normal file
49
docutils-py3.2-configparser.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
Index: docutils-0.7/docutils/frontend.py
|
||||||
|
===================================================================
|
||||||
|
--- docutils-0.7.orig/docutils/frontend.py
|
||||||
|
+++ docutils-0.7/docutils/frontend.py
|
||||||
|
@@ -671,7 +671,7 @@ class OptionParser(optparse.OptionParser
|
||||||
|
raise KeyError('No option with dest == %r.' % dest)
|
||||||
|
|
||||||
|
|
||||||
|
-class ConfigParser(CP.ConfigParser):
|
||||||
|
+class ConfigParser(CP.RawConfigParser):
|
||||||
|
|
||||||
|
old_settings = {
|
||||||
|
'pep_stylesheet': ('pep_html writer', 'stylesheet'),
|
||||||
|
@@ -693,7 +693,7 @@ Skipping "%s" configuration file.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
- CP.ConfigParser.__init__(self, *args, **kwargs)
|
||||||
|
+ CP.RawConfigParser.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
|
self._files = []
|
||||||
|
"""List of paths of configuration files read."""
|
||||||
|
@@ -708,7 +708,7 @@ Skipping "%s" configuration file.
|
||||||
|
except IOError:
|
||||||
|
continue
|
||||||
|
try:
|
||||||
|
- CP.ConfigParser.readfp(self, fp, filename)
|
||||||
|
+ CP.RawConfigParser.readfp(self, fp, filename)
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
sys.stderr.write(self.not_utf8_error % (filename, filename))
|
||||||
|
fp.close()
|
||||||
|
@@ -749,7 +749,7 @@ Skipping "%s" configuration file.
|
||||||
|
except KeyError:
|
||||||
|
continue
|
||||||
|
if option.validator:
|
||||||
|
- value = self.get(section, setting, raw=1)
|
||||||
|
+ value = self.get(section, setting)
|
||||||
|
try:
|
||||||
|
new_value = option.validator(
|
||||||
|
setting, value, option_parser,
|
||||||
|
@@ -778,7 +778,7 @@ Skipping "%s" configuration file.
|
||||||
|
section_dict = {}
|
||||||
|
if self.has_section(section):
|
||||||
|
for option in self.options(section):
|
||||||
|
- section_dict[option] = self.get(section, option, raw=1)
|
||||||
|
+ section_dict[option] = self.get(section, option)
|
||||||
|
return section_dict
|
||||||
|
|
||||||
|
|
@ -19,6 +19,10 @@ Group: Development/Languages
|
|||||||
License: Public Domain and MIT and Python and GPLv2
|
License: Public Domain and MIT and Python and GPLv2
|
||||||
URL: http://docutils.sourceforge.net
|
URL: http://docutils.sourceforge.net
|
||||||
Source0: http://downloads.sourceforge.net/docutils/%{srcname}-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/docutils/%{srcname}-%{version}.tar.gz
|
||||||
|
# ConfigParser on python-3.2 has changed behaviour
|
||||||
|
# Sent upstream here:
|
||||||
|
# https://sourceforge.net/tracker/?func=detail&aid=3149845&group_id=38414&atid=422030
|
||||||
|
Patch0: docutils-py3.2-configparser.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -67,6 +71,8 @@ This package contains the module, ported to run under python3.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
|
%patch0 -p1 -b .cfgparse
|
||||||
|
|
||||||
# Remove shebang from library files
|
# Remove shebang from library files
|
||||||
for file in docutils/_string_template_compat.py docutils/readers/python/pynodes.py ; do
|
for file in docutils/_string_template_compat.py docutils/readers/python/pynodes.py ; do
|
||||||
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file
|
sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $file
|
||||||
@ -168,6 +174,10 @@ rm -rf %{buildroot}
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 16 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7-5
|
||||||
|
- Fix building with python-3.2 via a workaround. Sent upstream awaiting
|
||||||
|
feedback or a better fix. Built in rawhide.
|
||||||
|
|
||||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-4
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user