patroni/debian/patches/offline_intersphinx.patch
Michael Banck 34a819de67 * debian/patches/offline_intersphinx.patch: Refreshed.
* debian/patches/requirements_setuptools.patch: Refreshed.
2020-10-02 19:33:54 +02:00

24 lines
1 KiB
Diff

Index: patroni/docs/conf.py
===================================================================
--- patroni.orig/docs/conf.py
+++ patroni/docs/conf.py
@@ -189,7 +189,17 @@ epub_exclude_files = ['search.html']
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'https://docs.python.org/': 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'
+ + '.'.join([str(x) for x in sys.version_info[0:2]])
+ + '/html/objects.inv'))
# A possibility to have an own stylesheet, to add new rules or override existing ones
# For the latter case, the CSS specificity of the rules should be higher than the default ones