[Python-modules-commits] [pytest] 06/09: Use local intersphinx mappings
Sebastian Ramacher
sramacher at moszumanska.debian.org
Thu Jul 13 12:55:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
sramacher pushed a commit to branch master
in repository pytest.
commit ef855b8a3fef9d9c798ac7bd787e0987edfdbbe6
Author: Sebastian Ramacher <sramacher at debian.org>
Date: Thu Jul 14 23:01:01 2016 +0200
Use local intersphinx mappings
Patch-Name: intersphinx.patch
---
doc/en/conf.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/doc/en/conf.py b/doc/en/conf.py
index 40f1e41..3bb64cc 100644
--- a/doc/en/conf.py
+++ b/doc/en/conf.py
@@ -309,11 +309,18 @@ texinfo_documents = [
]
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'python': ('http://docs.python.org/', None),
-# 'lib': ("http://docs.python.org/2.7library/", None),
- }
+def check_object_path(key, url, path):
+ if os.path.isfile(path):
+ return {key: (url, path)}
+ return {}
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {}
+intersphinx_mapping.update(
+ check_object_path('python',
+ 'http://docs.python.org/',
+ '/usr/share/doc/python%d.%d/html/objects.inv' % \
+ sys.version_info[:2]))
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/pytest.git
More information about the Python-modules-commits
mailing list