From ff0e60d4fb76ad9abf639f32af89475529bca06d4565761eda8051611befe0e8 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 4 Jan 2023 13:10:58 +0000 Subject: [PATCH] - Add sphinx-6.0.0.patch to fix tests for new version of sphinx. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=78 --- python-docutils.changes | 5 ++ python-docutils.spec | 6 +- sphinx-6.0.0.patch | 188 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 197 insertions(+), 2 deletions(-) create mode 100644 sphinx-6.0.0.patch diff --git a/python-docutils.changes b/python-docutils.changes index 6e324ce..4a2ec2d 100644 --- a/python-docutils.changes +++ b/python-docutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jan 4 13:09:13 UTC 2023 - Daniel Garcia + +- Add sphinx-6.0.0.patch to fix tests for new version of sphinx. + ------------------------------------------------------------------- Wed Nov 2 12:32:50 UTC 2022 - Matej Cepl diff --git a/python-docutils.spec b/python-docutils.spec index 23ccc19..a83b73d 100644 --- a/python-docutils.spec +++ b/python-docutils.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,8 @@ License: BSD-2-Clause AND Python-2.0 AND GPL-2.0-or-later AND GPL-3.0-or- URL: https://pypi.python.org/pypi/docutils/ Source: https://files.pythonhosted.org/packages/source/d/docutils/docutils-%{version}.tar.gz Source99: python-docutils-rpmlintrc +# PATCH-FIX-OPENSUSE sphinx-6.0.0.patch +Patch0: sphinx-6.0.0.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} @@ -62,7 +64,7 @@ such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText, an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax. %prep -%setup -q -n docutils-%{version} +%autosetup -p1 -n docutils-%{version} # 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 diff --git a/sphinx-6.0.0.patch b/sphinx-6.0.0.patch new file mode 100644 index 0000000..5e4a89f --- /dev/null +++ b/sphinx-6.0.0.patch @@ -0,0 +1,188 @@ +Index: docutils-0.19/test/test_parsers/test_rst/test_directives/test_code.py +=================================================================== +--- docutils-0.19.orig/test/test_parsers/test_rst/test_directives/test_code.py ++++ docutils-0.19/test/test_parsers/test_rst/test_directives/test_code.py +@@ -145,28 +145,35 @@ totest['code-parsing'] = [ + my_function + + (): +- \n\ ++ ++ \n\ + + 8 \n\ +- \n\ ++ ++ \n\ + + \'\'\'Test the lexer. + + 9 \n\ + + \'\'\' +- \n\ ++ ++ \n\ + + 10 \n\ +- \n\ ++ ++ \n\ + + 11 \n\ ++ + \n\ + + # and now for something completely different +- \n\ ++ ++ \n\ + + 12 \n\ ++ + \n\ + + print +Index: docutils-0.19/test/test_parsers/test_rst/test_directives/test_code_long.py +=================================================================== +--- docutils-0.19.orig/test/test_parsers/test_rst/test_directives/test_code_long.py ++++ docutils-0.19/test/test_parsers/test_rst/test_directives/test_code_long.py +@@ -48,28 +48,35 @@ totest['code-parsing-long'] = [ + my_function + + (): +- \n\ ++ ++ \n\ + + 8 \n\ +- \n\ ++ ++ \n\ + + \'\'\'Test the lexer. + + 9 \n\ + + \'\'\' +- \n\ ++ ++ \n\ + + 10 \n\ +- \n\ ++ ++ \n\ + + 11 \n\ ++ + \n\ + + # and now for something completely different +- \n\ ++ ++ \n\ + + 12 \n\ ++ + \n\ + + print +Index: docutils-0.19/test/test_parsers/test_rst/test_directives/test_include.py +=================================================================== +--- docutils-0.19.orig/test/test_parsers/test_rst/test_directives/test_include.py ++++ docutils-0.19/test/test_parsers/test_rst/test_directives/test_include.py +@@ -1053,7 +1053,8 @@ Included code + + ----------- + \n\ +- \n\ ++ ++ \n\ + This file is used by \n\ + + ``test_include.py`` +@@ -1083,9 +1084,11 @@ Included code + \n\ + + 3 \n\ +- \n\ ++ ++ \n\ + + 4 \n\ ++ + This file is used by \n\ + + ``test_include.py`` +@@ -1112,10 +1115,18 @@ TAB expansion with included code: + + `up` + . ++ ++ \n\ + <- leading raw tab. +- \n\ ++ ++ \n\ ++ \n\ + Newlines ++ ++ \n\ + are ++ ++ \n\ + normalized. + """ % include_literal], + ["""\ +@@ -1140,10 +1151,18 @@ Custom TAB expansion with included code: + + `up` + . ++ ++ \n\ + <- leading raw tab. +- \n\ ++ ++ \n\ ++ \n\ + Newlines ++ ++ \n\ + are ++ ++ \n\ + normalized. + """ % include_literal], + ["""\ +@@ -1168,10 +1187,18 @@ Custom TAB expansion with included code: + + `up` + . ++ ++ \n\ + \t<- leading raw tab. +- \n\ ++ ++ \n\ ++ \n\ + Newlines ++ ++ \n\ + are ++ ++ \n\ + normalized. + """ % include_literal], + ["""\ +@@ -1187,7 +1214,9 @@ Including includes/include14.txt + Including more/include6.txt as rst-code from includes/include14.txt: + + In includes/more/include6.txt +- \n\ ++ ++ \n\ ++ \n\ + + .. + \n\