- Add patch to fix build with pygments 2.4 and newer:
* pygments25.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=63
This commit is contained in:
parent
f6d949f7d0
commit
d74992fe32
107
pygments25.patch
Normal file
107
pygments25.patch
Normal file
@ -0,0 +1,107 @@
|
||||
Index: docutils/test/test_parsers/test_rst/test_directives/test_code.py
|
||||
===================================================================
|
||||
--- docutils/test/test_parsers/test_rst/test_directives/test_code.py (revision 8494)
|
||||
+++ docutils/test/test_parsers/test_rst/test_directives/test_code.py (revision 8495)
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
totest['code-parsing'] = [
|
||||
["""\
|
||||
-.. code:: python
|
||||
+.. code:: python3
|
||||
:class: testclass
|
||||
|
||||
print('hello world') # to stdout
|
||||
@@ -105,9 +105,9 @@
|
||||
""",
|
||||
"""\
|
||||
<document source="test data">
|
||||
- <literal_block classes="code python testclass" xml:space="preserve">
|
||||
+ <literal_block classes="code python3 testclass" xml:space="preserve">
|
||||
\n\
|
||||
- <inline classes="keyword">
|
||||
+ <inline classes="name builtin">
|
||||
print
|
||||
<inline classes="punctuation">
|
||||
(
|
||||
@@ -120,7 +120,7 @@
|
||||
# to stdout
|
||||
"""],
|
||||
["""\
|
||||
-.. code:: python
|
||||
+.. code:: python3
|
||||
:class: testclass
|
||||
:name: my_function
|
||||
:number-lines: 7
|
||||
@@ -134,7 +134,7 @@
|
||||
""",
|
||||
"""\
|
||||
<document source="test data">
|
||||
- <literal_block classes="code python testclass" ids="my-function" names="my_function" xml:space="preserve">
|
||||
+ <literal_block classes="code python3 testclass" ids="my-function" names="my_function" xml:space="preserve">
|
||||
<inline classes="ln">
|
||||
7 \n\
|
||||
<inline classes="keyword">
|
||||
@@ -167,7 +167,7 @@
|
||||
<inline classes="ln">
|
||||
12 \n\
|
||||
\n\
|
||||
- <inline classes="keyword">
|
||||
+ <inline classes="name builtin">
|
||||
print
|
||||
<inline classes="punctuation">
|
||||
(
|
||||
Index: docutils/test/test_parsers/test_rst/test_directives/test_code_long.py
|
||||
===================================================================
|
||||
--- docutils/test/test_parsers/test_rst/test_directives/test_code_long.py (revision 8494)
|
||||
+++ docutils/test/test_parsers/test_rst/test_directives/test_code_long.py (revision 8495)
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
totest['code-parsing-long'] = [
|
||||
["""\
|
||||
-.. code:: python
|
||||
+.. code:: python3
|
||||
:number-lines: 7
|
||||
|
||||
def my_function():
|
||||
@@ -36,7 +36,7 @@
|
||||
""",
|
||||
"""\
|
||||
<document source="test data">
|
||||
- <literal_block classes="code python" xml:space="preserve">
|
||||
+ <literal_block classes="code python3" xml:space="preserve">
|
||||
<inline classes="ln">
|
||||
7 \n\
|
||||
<inline classes="keyword">
|
||||
@@ -69,7 +69,7 @@
|
||||
<inline classes="ln">
|
||||
12 \n\
|
||||
\n\
|
||||
- <inline classes="keyword">
|
||||
+ <inline classes="name builtin">
|
||||
print
|
||||
<inline classes="punctuation">
|
||||
(
|
||||
Index: docutils/test/test_parsers/test_rst/test_interpreted.py
|
||||
===================================================================
|
||||
--- docutils/test/test_parsers/test_rst/test_interpreted.py (revision 8494)
|
||||
+++ docutils/test/test_parsers/test_rst/test_interpreted.py (revision 8495)
|
||||
@@ -271,7 +271,7 @@
|
||||
Custom role based on code role:
|
||||
|
||||
.. role:: python(code)
|
||||
- :language: python
|
||||
+ :language: python3
|
||||
:class: testclass
|
||||
|
||||
Python code :python:`print("The end")`.
|
||||
@@ -282,8 +282,8 @@
|
||||
Custom role based on code role:
|
||||
<paragraph>
|
||||
Python code \n\
|
||||
- <literal classes="code testclass python">
|
||||
- <inline classes="keyword">
|
||||
+ <literal classes="code testclass python3">
|
||||
+ <inline classes="name builtin">
|
||||
print
|
||||
<inline classes="punctuation">
|
||||
(
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 14 09:56:02 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Add patch to fix build with pygments 2.4 and newer:
|
||||
* pygments25.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 15 10:56:28 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -30,10 +30,10 @@ Version: 0.16
|
||||
Release: 0
|
||||
Summary: Python Documentation Utilities
|
||||
License: Python-2.0 AND BSD-2-Clause AND GPL-2.0-or-later AND GPL-3.0-or-later AND SUSE-Public-Domain
|
||||
Group: Development/Languages/Python
|
||||
URL: https://pypi.python.org/pypi/docutils/
|
||||
Source: https://files.pythonhosted.org/packages/source/d/docutils/docutils-%{version}.tar.gz
|
||||
Source99: python-docutils-rpmlintrc
|
||||
Patch0: pygments25.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module xml}
|
||||
BuildRequires: fdupes
|
||||
@ -63,6 +63,7 @@ easy-to-read, what-you-see-is-what-you-get plaintext markup syntax.
|
||||
|
||||
%prep
|
||||
%setup -q -n docutils-%{version}
|
||||
%patch0 -p1
|
||||
# Remove useless ".py" ending from executables:
|
||||
for i in tools/rst*; do mv "$i" "${i/.py}"; done
|
||||
sed -i "s|'tools/\(rst.*\)\.py'|'tools/\1'|" setup.py
|
||||
|
Loading…
Reference in New Issue
Block a user