patroni/debian/patches/offline_intersphinx.patch
Michael Banck ff2cdb3974 * debian/patches/offline_intersphinx.patch: New patch, force usage of offline
objects.inv from python-doc package instead of downloading it.
  * debian/control (Build-Depends): Added python3-doc.
2020-01-23 18:19:30 +01:00

22 lines
978 B
Diff

--- ./docs/conf.py.orig 2020-01-23 18:12:00.026645214 +0100
+++ ./docs/conf.py 2020-01-23 18:13:43.635004952 +0100
@@ -189,7 +189,17 @@
# 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