]> git.pld-linux.org Git - packages/docutils.git/commitdiff
- added py3 patch, adjusted test BRs; tests are passing for me now
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Mar 2020 17:49:21 +0000 (18:49 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Mar 2020 17:49:21 +0000 (18:49 +0100)
docutils-py3.patch [new file with mode: 0644]
docutils.spec

diff --git a/docutils-py3.patch b/docutils-py3.patch
new file mode 100644 (file)
index 0000000..a68bef9
--- /dev/null
@@ -0,0 +1,42 @@
+--- 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">
+             (
index 25085ad8f97869f204ce6f734a84bc1816a9f1e3..0427fc5145cef6f57f5716a65f3326add27440d3 100644 (file)
@@ -15,15 +15,25 @@ Group:              Development/Tools
 #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
@@ -46,7 +56,7 @@ do odczytania, łatwy w użyciu język opisu tekstu typu WYSIWYG.
 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,
@@ -88,6 +98,7 @@ Ten pakiet zawiera Docutils dla Pythona 3.
 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,
@@ -106,6 +117,7 @@ Ten pakiet dostarcza moduły Docutils dla Pythona 3.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %if %{with python2}
@@ -122,7 +134,7 @@ PYTHONPATH=$(pwd)/build-2/lib \
 
 %if %{with tests}
 PYTHONPATH=$(pwd)/build-3/lib \
-%{__python3} test3/alltests.py
+%{__python3} test/alltests.py
 %endif
 %endif
 
This page took 0.084099 seconds and 4 git commands to generate.