[Python-modules-commits] [django-reversion] 03/07: use local objects.inv where possible

Michael Fladischer fladi at moszumanska.debian.org
Fri Apr 22 20:43:20 UTC 2016


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

fladi pushed a commit to branch master
in repository django-reversion.

commit 31470d3f1b10086e0929d43c4a4fe5e6e807084d
Author: Michael Fladischer <fladi at debian.org>
Date:   Thu Oct 8 08:56:37 2015 -0700

    use local objects.inv where possible
    
     Upstream uses intersphinx mappings that fetch the objects.inv for Python, HTTP
     from a remote host. Using the local objects.inv from Python enables the package
     to build without network connection.
    Forwarded: not-needed
    Last-Update: 2015-05-19
    
    Patch-Name: intersphinx.patch
---
 docs/conf.py | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/docs/conf.py b/docs/conf.py
index 998c66b..3f448db 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -244,4 +244,15 @@ texinfo_documents = [
 
 
 # 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'))
+

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



More information about the Python-modules-commits mailing list