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

Barry Warsaw barry at moszumanska.debian.org
Fri Sep 5 23:26:24 UTC 2014


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

barry pushed a commit to branch master
in repository tox.

commit 7c4be38a084c80cb70c26ebfbe1860a3667505d2
Author: Fladischer Michael <FladischerMichael at fladi.at>
Date:   Mon Jul 15 13:47:06 2013 -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 f643b48..e34f8f1 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -253,7 +253,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