Apply patchs:

0002-Use-local-intersphinx-mappings.patch
From: Sebastian Ramacher <sramacher@debian.org>
Date: Thu, 14 Jul 2016 23:01:01 +0200
Subject: Use local intersphinx mappings
0005-Drop-sphinxcontrib_trio-extension.patch
From: =?utf-8?b?T25kxZllaiBOb3bDvQ==?= <onovy@debian.org>
Date: Fri, 15 Jun 2018 13:43:56 +0200
Subject: Drop sphinxcontrib_trio extension
0006-Disable-sphinx-extensions.patch
From: =?utf-8?b?T25kxZllaiBOb3bDvQ==?= <onovy@debian.org>
Date: Sun, 3 Nov 2019 15:47:11 -0800
Subject: Disable some of Sphinx extensions which we don't have in Debian
This commit is contained in:
su-fang 2023-02-15 10:04:16 +08:00
parent 1b06879931
commit 200a962388
2 changed files with 22 additions and 3 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
pytest (7.2.1-ok2) yangtze; urgency=medium
* Apply patchs.
-- sufang <sufang@kylinos.cn> Wed, 15 Feb 2023 10:03:38 +0800
pytest (7.2.1-ok1) yangtze; urgency=medium
* Build for openkylin.

View File

@ -67,15 +67,12 @@ latex_elements = {
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
"pallets_sphinx_themes",
"pygments_pytest",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_removed_in",
"sphinxcontrib_trio",
]
# Building PDF docs on readthedocs requires inkscape for svg to pdf
@ -395,6 +392,22 @@ intersphinx_mapping = {
"setuptools": ("https://setuptools.pypa.io/en/stable", None),
"packaging": ("https://packaging.python.org/en/latest", None),
}
def check_object_path(key, url, path):
if os.path.isfile(path):
return {key: (url, path)}
return {}
intersphinx_mapping = {}
intersphinx_mapping.update(
check_object_path('python',
'http://docs.python.org/',
'/usr/share/doc/python%d.%d/html/objects.inv' % \
sys.version_info[:2]))
# The Debian packaging for pluggy does not yet generate the documentation
intersphinx_mapping.update(
check_object_path('pluggy',
'https://pluggy.readthedocs.io/en/latest',
'/usr/share/doc/python3-pluggy/html/objects.inv'))
def configure_logging(app: "sphinx.application.Sphinx") -> None: