--- /dev/null
+--- docutils-0.16/test/test_parsers/test_rst/test_interpreted.py.orig 2019-11-04 16:12:47.000000000 +0100
++++ docutils-0.16/test/test_parsers/test_rst/test_interpreted.py 2020-03-22 16:07:00.375252448 +0100
+@@ -281,7 +281,7 @@
+ <paragraph>
+ Python code \n\
+ <literal classes="code testclass python">
+- <inline classes="keyword">
++ <inline classes="name builtin">
+ print
+ <inline classes="punctuation">
+ (
+--- docutils-0.16/test/test_parsers/test_rst/test_directives/test_code.py.orig 2019-11-04 16:12:47.000000000 +0100
++++ docutils-0.16/test/test_parsers/test_rst/test_directives/test_code.py 2020-03-22 16:09:30.731104567 +0100
+@@ -105,7 +105,7 @@
+ <document source="test data">
+ <literal_block classes="code python testclass" xml:space="preserve">
+ \n\
+- <inline classes="keyword">
++ <inline classes="name builtin">
+ print
+ <inline classes="punctuation">
+ (
+@@ -165,7 +165,7 @@
+ <inline classes="ln">
+ 12 \n\
+ \n\
+- <inline classes="keyword">
++ <inline classes="name builtin">
+ print
+ <inline classes="punctuation">
+ (
+--- docutils-0.16/test/test_parsers/test_rst/test_directives/test_code_long.py.orig 2019-11-04 16:12:47.000000000 +0100
++++ docutils-0.16/test/test_parsers/test_rst/test_directives/test_code_long.py 2020-03-22 16:10:23.674151084 +0100
+@@ -67,7 +67,7 @@
+ <inline classes="ln">
+ 12 \n\
+ \n\
+- <inline classes="keyword">
++ <inline classes="name builtin">
+ print
+ <inline classes="punctuation">
+ (
#Source0Download: https://pypi.org/simple/docutils/
Source0: https://files.pythonhosted.org/packages/source/d/docutils/%{name}-%{version}.tar.gz
# Source0-md5: 44952782107930ddfcd37ae48eee0857
+Patch0: %{name}-py3.patch
URL: http://docutils.sourceforge.net/
%if %{with python2}
-BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-devel >= 1:2.7
BuildRequires: python-setuptools
+%if %{with tests}
+# py3 patch assumes python3 lexer is the default, as it is since pygments 2.5.0
+BuildRequires: python-pygments >= 2.5.0
+# a few tests fail with _xmlplus implementation of xml
+BuildConflicts: python-PyXML
+%endif
%endif
%if %{with python3}
-BuildRequires: python3-2to3 >= 1:3.4
-BuildRequires: python3-devel >= 1:3.4
+BuildRequires: python3-devel >= 1:3.5
BuildRequires: python3-setuptools
+%if %{with tests}
+# py3 patch assumes python3 lexer is the default, as it is since pygments 2.5.0
+BuildRequires: python3-pygments >= 2.5.0
+%endif
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
Summary: Text documents processing modules for Python 2.x
Summary(pl.UTF-8): Moduły Pythona 2.x do przetwarzania dokumentów tekstowych
Group: Development/Languages/Python
-%pyrequires_eq python-libs
+Requires: python-libs >= 1:2.7
%description -n python-%{name}
Docutils are utilities for general- and special-purpose documentation,
Summary: Text documents processing modules for Python 3.x
Summary(pl.UTF-8): Moduły Pythona 3.x do przetwarzania dokumentów tekstowych
Group: Development/Languages/Python
+Requires: python3-libs >= 1:3.5
%description -n python3-%{name}
Docutils are utilities for general- and special-purpose documentation,
%prep
%setup -q
+%patch0 -p1
%build
%if %{with python2}
%if %{with tests}
PYTHONPATH=$(pwd)/build-3/lib \
-%{__python3} test3/alltests.py
+%{__python3} test/alltests.py
%endif
%endif