1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
From: Christian Bayle <bayle@debian.org>
Date: Sun, 20 Apr 2025 22:56:15 +0200
Subject: Disable intersphinx net access
Forwarded: not-needed
---
docs/conf.py | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index 570cea1..28ee8b9 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -65,10 +65,23 @@ extlinks = {
"issue": ("https://github.com/useblocks/sphinx-needs/issues/%s", "issue #%s"),
}
-intersphinx_mapping = {
- "python": ("https://docs.python.org/3.8", None),
- "sphinx": ("https://www.sphinx-doc.org/en/master", None),
-}
+#intersphinx_mapping = {
+# "python": ("https://docs.python.org/3.8", None),
+# "sphinx": ("https://www.sphinx-doc.org/en/master", 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',
+ 'https://docs.python.org/3.8',
+ '/usr/share/doc/python3.13/html/objects.inv'))
+intersphinx_mapping.update(check_object_path('sphinx',
+ 'https://www.sphinx-doc.org/en/master',
+ '/usr/share/doc/sphinx-doc/html/objects.inv'))
# smartquotes = False
|