File: local-intersphinx

package info (click to toggle)
twine 6.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 836 kB
  • sloc: python: 4,372; makefile: 23; sh: 6
file content (39 lines) | stat: -rw-r--r-- 1,272 bytes parent folder | download | duplicates (2)
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
From: Stefano Rivera <stefanor@debian.org>
Date: Fri, 5 Nov 2021 17:33:55 -0700
Subject: Local Intersphinx Mapping

Don't hit the Internet for Intersphinx references, we have most of them
in Debian. Packaging's docs aren't packaged (yet?).

Forwarded: not-needed
---
 docs/conf.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index d95f0de..f43a7b5 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -10,7 +10,7 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-# import sys
+import sys
 # import os
 
 # If extensions (or modules to document with autodoc) are in another directory,
@@ -287,8 +287,11 @@ linkcheck_ignore = [
 ]
 
 intersphinx_mapping = {
-    "python": ("https://docs.python.org/3", None),
-    "requests": ("https://requests.readthedocs.io/en/latest/", None),
+    "python": ("https://docs.python.org/3",
+               f"/usr/share/doc/python{sys.version_info[0]}."
+               f"{sys.version_info[1]}/html/objects.inv"),
+    "requests": ("https://requests.readthedocs.io/en/latest/",
+                 "/usr/share/doc/python-requests-doc/html/objects.inv"),
     "packaging": ("https://packaging.pypa.io/en/latest/", None),
 }