[elbe-devel] [PATCH 1/9] docs: use local intersphinx inventory when building debian package

Thomas Weißschuh thomas.weissschuh at linutronix.de
Fri Mar 21 14:31:25 CET 2025


By default intersphinx will try to download the sphinx inventory from the
internet during the build. This violates Debian policy. Instead use the
inventory file from the python documentation package.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 debian/control | 1 +
 docs/conf.py   | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index e1c7c7ffdb2307c24c0a9922b86177f936b65b8c..eed58cbbe003a82500c0a8200d01fde89b0b8924 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Build-Depends: debhelper-compat (= 13),
   dh-python,
   bash-completion,
   python3,
+  python3-doc,
   python3-setuptools,
   python3-mako,
   xml-core,
diff --git a/docs/conf.py b/docs/conf.py
index f07f7437557bb57daa91c1a02fd186de495cf7b1..2abef50f94733af6c199938ccf6996cde33c12d5 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -89,7 +89,9 @@ todo_include_todos = False
 manpages_url = 'https://man.archlinux.org/search?q={path}'
 
 intersphinx_mapping = {
-    'python': ('https://docs.python.org/3', None),
+    'python': ('https://docs.python.org/3', (
+        '/usr/share/doc/python3/html/objects.inv' if 'DEB_BUILD_ARCH' in os.environ else None,
+    )),
 }
 
 # -- Options for HTML output ----------------------------------------------

-- 
2.48.1



More information about the elbe-devel mailing list