Update to the previous fixes -- I scratch built this on F14 by mistake
so there were more things to change.
This commit is contained in:
parent
8cb9a4d2a7
commit
985c740cb3
29
docutils-test-io-exception.patch
Normal file
29
docutils-test-io-exception.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Index: docutils/test/test_functional.py
|
||||||
|
===================================================================
|
||||||
|
--- docutils/test/test_functional.py (revision 7036)
|
||||||
|
+++ docutils/test/test_functional.py (working copy)
|
||||||
|
@@ -171,7 +171,10 @@
|
||||||
|
no_expected = self.no_expected_template % {
|
||||||
|
'exp': expected_path, 'out': params['destination_path']}
|
||||||
|
self.assert_(os.access(expected_path, os.R_OK), no_expected)
|
||||||
|
- f = open(expected_path, 'r') # ! 'rb' leads to errors with Python 3!
|
||||||
|
+ if sys.version_info < (3,0):
|
||||||
|
+ f = open(expected_path, 'r')
|
||||||
|
+ else:
|
||||||
|
+ f = open(expected_path, 'r', encoding='utf-8') # ! 'rb' leads to errors with Python 3!
|
||||||
|
# Normalize line endings:
|
||||||
|
expected = '\n'.join(f.read().splitlines())
|
||||||
|
f.close()
|
||||||
|
Index: docutils/test/test_io.py
|
||||||
|
===================================================================
|
||||||
|
--- docutils/test/test_io.py (revision 7036)
|
||||||
|
+++ docutils/test/test_io.py (working copy)
|
||||||
|
@@ -99,7 +99,7 @@
|
||||||
|
except UnicodeEncodeError:
|
||||||
|
try:
|
||||||
|
open(u'\xfc'.encode(sys.getfilesystemencoding(), 'replace'))
|
||||||
|
- except IOError:
|
||||||
|
+ except IOError, e:
|
||||||
|
uioe = e
|
||||||
|
if locale:
|
||||||
|
locale.setlocale(locale.LC_ALL, 'C') # reset
|
@ -25,6 +25,7 @@ URL: http://docutils.sourceforge.net
|
|||||||
# python setup.py sdist
|
# python setup.py sdist
|
||||||
# The tarball is in dist/docutils-VERSION.tar.gz
|
# The tarball is in dist/docutils-VERSION.tar.gz
|
||||||
Source0: %{srcname}-%{version}.tar.gz
|
Source0: %{srcname}-%{version}.tar.gz
|
||||||
|
Patch0: docutils-test-io-exception.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -73,6 +74,7 @@ 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 .testio
|
||||||
|
|
||||||
# We want to check if this is necessary every time we rebuild
|
# We want to check if this is necessary every time we rebuild
|
||||||
# since it is icky, nasty, and gross.
|
# since it is icky, nasty, and gross.
|
||||||
|
Loading…
Reference in New Issue
Block a user