[Python-modules-commits] [tox] 02/08: Use local object inventory files for sphinx

Barry Warsaw barry at moszumanska.debian.org
Wed Nov 16 20:48:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository tox.

commit 133bc7276b4d4d1a659f04b5bd39bdcddb64415b
Author: Fladischer Michael <FladischerMichael at fladi.at>
Date:   Tue Jun 17 16:05:44 2014 -0400

    Use local object inventory files for sphinx
    
     Use the local object inventory files to prevent sphinx-build from
     downloading them during build.
     This patch makes the intersphinx mappings depend on the existence of
     these files, thus passing Debian Policy 12.3 while still maintaining
     a level of comfort for the reader of the documentation.
    Forwarded: not-needed
    Last-Update: 2011-03-03
    
    Patch-Name: intersphinx-mapping.patch
---
 doc/conf.py | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/doc/conf.py b/doc/conf.py
index 6094f60..c9b1661 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -258,7 +258,23 @@ epub_copyright = u'2010, holger krekel'
 
 
 # Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://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'))
+intersphinx_mapping.update(
+    check_object_path('sphinx',
+                      'http://sphinx.pocoo.org/',
+                      '/usr/share/doc/python-sphinx/html/objects.inv'))
+
 
 def setup(app):
     #from sphinx.ext.autodoc import cut_lines

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/tox.git



More information about the Python-modules-commits mailing list