diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/docutils_manpage_macros.diff | 22 | ||||
-rw-r--r-- | debian/patches/intersphinx_local.diff | 51 | ||||
-rw-r--r-- | debian/patches/move_sphinxcontrib_to_extras_require.diff | 40 | ||||
-rw-r--r-- | debian/patches/no_external_css.diff | 21 | ||||
-rw-r--r-- | debian/patches/remove_contrib_references.diff | 79 | ||||
-rw-r--r-- | debian/patches/series | 8 | ||||
-rw-r--r-- | debian/patches/skip_tests_jsmath.diff | 36 | ||||
-rw-r--r-- | debian/patches/skip_tests_serializinghtml.diff | 28 | ||||
-rw-r--r-- | debian/patches/use_packaged_mathjax.diff | 20 |
9 files changed, 305 insertions, 0 deletions
diff --git a/debian/patches/docutils_manpage_macros.diff b/debian/patches/docutils_manpage_macros.diff new file mode 100644 index 0000000..b854af4 --- /dev/null +++ b/debian/patches/docutils_manpage_macros.diff @@ -0,0 +1,22 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Thu, 3 Aug 2023 19:23:41 +0300 +Subject: Make test_build_manpage pass with docutils 0.19+dfsg-7 + +I backported the change from upstream 0.21 to our 0.19 and 0.20 packaging. +--- + tests/test_builders/test_build_manpage.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_builders/test_build_manpage.py b/tests/test_builders/test_build_manpage.py +index 7172281..735f597 100644 +--- a/tests/test_builders/test_build_manpage.py ++++ b/tests/test_builders/test_build_manpage.py +@@ -52,7 +52,7 @@ def test_captioned_code_block(app, status, warning): + app.build(force_all=True) + content = (app.outdir / 'python.1').read_text(encoding='utf8') + +- if docutils.__version_info__[:2] < (0, 21): ++ if docutils.__version_info__[:2] < (0, 19): + expected = """\ + .sp + caption \\fItest\\fP rb diff --git a/debian/patches/intersphinx_local.diff b/debian/patches/intersphinx_local.diff new file mode 100644 index 0000000..8f63354 --- /dev/null +++ b/debian/patches/intersphinx_local.diff @@ -0,0 +1,51 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Tue, 2 Jun 2020 12:22:52 +0300 +Subject: Use local intersphinx inventory + +To prevent Sphinx from downloading https://docs.python.org/3/objects.inv +during build. +--- + doc/conf.py | 5 ++--- + doc/tutorial/deploying.rst | 9 ++++++--- + 2 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/doc/conf.py b/doc/conf.py +index 437b08f..8b21457 100644 +--- a/doc/conf.py ++++ b/doc/conf.py +@@ -159,9 +159,8 @@ texinfo_documents = [ + ] + + intersphinx_mapping = { +- 'python': ('https://docs.python.org/3/', None), +- 'requests': ('https://requests.readthedocs.io/en/latest/', None), +- 'readthedocs': ('https://docs.readthedocs.io/en/stable', None), ++ 'python': ('/usr/share/doc/python3-doc/html', None), ++ 'requests': ('/usr/share/doc/python-requests-doc/html', None), + } + + # Sphinx document translation with sphinx gettext feature uses these settings: +diff --git a/doc/tutorial/deploying.rst b/doc/tutorial/deploying.rst +index 6b7913f..f5fd24e 100644 +--- a/doc/tutorial/deploying.rst ++++ b/doc/tutorial/deploying.rst +@@ -155,13 +155,16 @@ Read the Docs + ~~~~~~~~~~~~~ + + `Read the Docs`_ offers integration with both GitHub and GitLab. The quickest +-way of getting started is to follow :doc:`the RTD +-tutorial <readthedocs:tutorial/index>`, which is loosely based on this one. ++way of getting started is to follow `the RTD tutorial`_, which is loosely ++based on this one. + You can publish your sources on GitHub as explained :ref:`in the previous + section <publishing-sources>`, then skip directly to +-:ref:`readthedocs:tutorial/index:Sign up for Read the Docs`. ++`Sign up for Read the Docs`_. + If you choose GitLab instead, the process is similar. + ++.. _the RTD tutorial: https://docs.readthedocs.io/en/stable/tutorial/index.html ++.. _Sign up for Read the Docs: https://docs.readthedocs.io/en/stable/tutorial/index.html#sign-up-for-read-the-docs ++ + GitHub Pages + ~~~~~~~~~~~~ + diff --git a/debian/patches/move_sphinxcontrib_to_extras_require.diff b/debian/patches/move_sphinxcontrib_to_extras_require.diff new file mode 100644 index 0000000..8e73096 --- /dev/null +++ b/debian/patches/move_sphinxcontrib_to_extras_require.diff @@ -0,0 +1,40 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Fri, 7 Feb 2020 13:59:30 +0300 +Subject: Move sphinxcontrib modules to extras_require + +--- + pyproject.toml | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 8aa49aa..5dbb696 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -56,12 +56,6 @@ classifiers = [ + "Topic :: Utilities", + ] + dependencies = [ +- "sphinxcontrib-applehelp", +- "sphinxcontrib-devhelp", +- "sphinxcontrib-jsmath", +- "sphinxcontrib-htmlhelp>=2.0.0", +- "sphinxcontrib-serializinghtml>=1.1.9", +- "sphinxcontrib-qthelp", + "Jinja2>=3.0", + "Pygments>=2.14", + "docutils>=0.18.1,<0.22", +@@ -98,6 +92,14 @@ test = [ + "cython>=3.0", + "setuptools>=67.0", # for Cython compilation + ] ++sphinxcontrib = [ ++ "sphinxcontrib-applehelp", ++ "sphinxcontrib-devhelp", ++ "sphinxcontrib-jsmath", ++ "sphinxcontrib-htmlhelp>=2.0.0", ++ "sphinxcontrib-serializinghtml>=1.1.9", ++ "sphinxcontrib-qthelp", ++] + + [[project.authors]] + name = "Georg Brandl" diff --git a/debian/patches/no_external_css.diff b/debian/patches/no_external_css.diff new file mode 100644 index 0000000..697de83 --- /dev/null +++ b/debian/patches/no_external_css.diff @@ -0,0 +1,21 @@ +From: Chris Lamb <lamby@debian.org> +Date: Sat, 14 Apr 2018 10:10:45 +0100 +Subject: Don't use Google Fonts to avoid privacy breach. + +--- + sphinx/themes/pyramid/layout.html | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/sphinx/themes/pyramid/layout.html b/sphinx/themes/pyramid/layout.html +index ffa9313..19f351d 100644 +--- a/sphinx/themes/pyramid/layout.html ++++ b/sphinx/themes/pyramid/layout.html +@@ -1,8 +1,6 @@ + {%- extends "basic/layout.html" %} + + {%- block extrahead %} +-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Neuton&subset=latin" type="text/css" media="screen" charset="utf-8" /> +-<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&subset=latin" type="text/css" media="screen" charset="utf-8" /> + <!--[if lte IE 6]> + <link rel="stylesheet" href="{{ pathto('_static/ie6.css', 1) }}" type="text/css" media="screen" charset="utf-8" /> + <![endif]--> diff --git a/debian/patches/remove_contrib_references.diff b/debian/patches/remove_contrib_references.diff new file mode 100644 index 0000000..ce28b5b --- /dev/null +++ b/debian/patches/remove_contrib_references.diff @@ -0,0 +1,79 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Wed, 25 Dec 2019 23:18:56 +0300 +Subject: Remove references to sphinxcontrib modules + +They are not packaged yet, and when they are, we would want to avoid +dependency loops anyway. +--- + doc/usage/builders/index.rst | 24 ------------------------ + sphinx/application.py | 1 - + 2 files changed, 25 deletions(-) + +diff --git a/doc/usage/builders/index.rst b/doc/usage/builders/index.rst +index 9c538ee..21763c1 100644 +--- a/doc/usage/builders/index.rst ++++ b/doc/usage/builders/index.rst +@@ -121,12 +121,6 @@ The most common builders are: + also generates HTML Help support files that allow the Microsoft HTML Help + Workshop to compile them into a CHM file. + +- .. autoattribute:: name +- +- .. autoattribute:: format +- +- .. autoattribute:: supported_image_types +- + .. module:: sphinxcontrib.qthelp + .. class:: QtHelpBuilder + +@@ -138,12 +132,6 @@ The most common builders are: + + Moved to sphinxcontrib.qthelp from sphinx.builders package. + +- .. autoattribute:: name +- +- .. autoattribute:: format +- +- .. autoattribute:: supported_image_types +- + .. _Qt help: https://doc.qt.io/qt-4.8/qthelp-framework.html + + .. module:: sphinxcontrib.applehelp +@@ -164,12 +152,6 @@ The most common builders are: + output will not be valid until :program:`hiutil` has been run on all of the + ``.lproj`` folders within the bundle. + +- .. autoattribute:: name +- +- .. autoattribute:: format +- +- .. autoattribute:: supported_image_types +- + .. versionadded:: 1.3 + + .. versionchanged:: 2.0 +@@ -183,12 +165,6 @@ The most common builders are: + also generates `GNOME Devhelp <https://wiki.gnome.org/Apps/Devhelp>`__ + support file that allows the GNOME Devhelp reader to view them. + +- .. autoattribute:: name +- +- .. autoattribute:: format +- +- .. autoattribute:: supported_image_types +- + .. versionchanged:: 2.0 + + Moved to sphinxcontrib.devhelp from sphinx.builders package. +diff --git a/sphinx/application.py b/sphinx/application.py +index 7d16d9a..3791738 100644 +--- a/sphinx/application.py ++++ b/sphinx/application.py +@@ -116,7 +116,6 @@ _first_party_themes = ( + 'alabaster', + ) + builtin_extensions += _first_party_themes +-builtin_extensions += _first_party_extensions + + ENV_PICKLE_FILENAME = 'environment.pickle' + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..f33bbe2 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,8 @@ +no_external_css.diff +remove_contrib_references.diff +skip_tests_jsmath.diff +use_packaged_mathjax.diff +skip_tests_serializinghtml.diff +move_sphinxcontrib_to_extras_require.diff +intersphinx_local.diff +docutils_manpage_macros.diff diff --git a/debian/patches/skip_tests_jsmath.diff b/debian/patches/skip_tests_jsmath.diff new file mode 100644 index 0000000..ad718e0 --- /dev/null +++ b/debian/patches/skip_tests_jsmath.diff @@ -0,0 +1,36 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Wed, 25 Dec 2019 23:37:50 +0300 +Subject: Skip tests that require sphinxcontrib.jsmath module + +--- + tests/test_builders/test_build_html_maths.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/test_builders/test_build_html_maths.py b/tests/test_builders/test_build_html_maths.py +index 900846b..3870093 100644 +--- a/tests/test_builders/test_build_html_maths.py ++++ b/tests/test_builders/test_build_html_maths.py +@@ -20,6 +20,7 @@ def test_html_math_renderer_is_imgmath(app, status, warning): + assert app.builder.math_renderer_name == 'imgmath' + + ++@pytest.mark.skip('Requires sphinxcontrib.jsmath module') + @pytest.mark.sphinx('html', testroot='basic', + confoverrides={'extensions': ['sphinxcontrib.jsmath', + 'sphinx.ext.imgmath']}) +@@ -40,6 +41,7 @@ def test_html_math_renderer_is_duplicated2(app, status, warning): + assert app.builder.math_renderer_name == 'imgmath' # The another one is chosen + + ++@pytest.mark.skip('Requires sphinxcontrib.jsmath module') + @pytest.mark.sphinx('html', testroot='basic', + confoverrides={'extensions': ['sphinxcontrib.jsmath', + 'sphinx.ext.imgmath'], +@@ -48,6 +50,7 @@ def test_html_math_renderer_is_chosen(app, status, warning): + assert app.builder.math_renderer_name == 'imgmath' + + ++@pytest.mark.skip('Requires sphinxcontrib.jsmath module') + @pytest.mark.sphinx('html', testroot='basic', + confoverrides={'extensions': ['sphinxcontrib.jsmath', + 'sphinx.ext.mathjax'], diff --git a/debian/patches/skip_tests_serializinghtml.diff b/debian/patches/skip_tests_serializinghtml.diff new file mode 100644 index 0000000..22198db --- /dev/null +++ b/debian/patches/skip_tests_serializinghtml.diff @@ -0,0 +1,28 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Thu, 6 Feb 2020 23:55:28 +0300 +Subject: Skip tests that require sphinxcontrib.serializinghtml module + +--- + tests/test_writers/test_api_translator.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/test_writers/test_api_translator.py b/tests/test_writers/test_api_translator.py +index 9f2bd44..1c8defb 100644 +--- a/tests/test_writers/test_api_translator.py ++++ b/tests/test_writers/test_api_translator.py +@@ -36,6 +36,7 @@ def test_singlehtml_set_translator_for_singlehtml(app, status, warning): + assert translator_class.__name__ == 'ConfSingleHTMLTranslator' + + ++@pytest.mark.skip('Requires sphinxcontrib.serializinghtml module') + @pytest.mark.sphinx('pickle', testroot='api-set-translator') + def test_pickle_set_translator_for_pickle(app, status, warning): + translator_class = app.builder.get_translator_class() +@@ -43,6 +44,7 @@ def test_pickle_set_translator_for_pickle(app, status, warning): + assert translator_class.__name__ == 'ConfPickleTranslator' + + ++@pytest.mark.skip('Requires sphinxcontrib.serializinghtml module') + @pytest.mark.sphinx('json', testroot='api-set-translator') + def test_json_set_translator_for_json(app, status, warning): + translator_class = app.builder.get_translator_class() diff --git a/debian/patches/use_packaged_mathjax.diff b/debian/patches/use_packaged_mathjax.diff new file mode 100644 index 0000000..e9694da --- /dev/null +++ b/debian/patches/use_packaged_mathjax.diff @@ -0,0 +1,20 @@ +From: Dmitry Shachnev <mitya57@debian.org> +Date: Tue, 4 Feb 2020 00:12:18 +0300 +Subject: Use packaged MathJax (for our own documentation) + +--- + doc/conf.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/doc/conf.py b/doc/conf.py +index 49fcba4..437b08f 100644 +--- a/doc/conf.py ++++ b/doc/conf.py +@@ -230,6 +230,7 @@ nitpick_ignore = { + ('std:confval', 'globaltoc_maxdepth'), + } + ++mathjax_path = 'file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' + + # -- Extension interface ------------------------------------------------------- + |