[Python-modules-commits] [tox] 29/69: Use local object inventory files for sphinx
Barry Warsaw
barry at moszumanska.debian.org
Fri Sep 5 23:26:26 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 c09f29179cfd1dff368ab313e26bfc2a3449052d
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 fda4ac9..9782193 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