[Python-modules-commits] [cf-python] 06/11: Patch sphinx config to avoid network access and add local intersphinx links.

Klaus Zimmermann zklaus-guest at moszumanska.debian.org
Wed Sep 14 15:09:46 UTC 2016


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

zklaus-guest pushed a commit to branch master
in repository cf-python.

commit 9f939f75126666052b245cf7ff99a19db9f134ca
Author: Klaus Zimmermann <klaus_zimmermann at gmx.de>
Date:   Wed Sep 14 13:25:19 2016 +0200

    Patch sphinx config to avoid network access and add local intersphinx links.
    
    Signed-off-by: Klaus Zimmermann <klaus_zimmermann at gmx.de>
---
 docs/source/conf.py | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/docs/source/conf.py b/docs/source/conf.py
index 50084c5..7e24935 100755
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -72,6 +72,30 @@ intersphinx_mapping = {
     'scipy':      ('http://docs.scipy.org/doc/scipy/reference', None),
     }
 
+def check_object_path(key, url, path):
+    if os.path.isfile(path):
+        return {key: (url, path)}
+    return {}
+
+intersphinx_mapping.update(check_object_path('sphinx',
+                                             'http://sphinx.pocoo.org/',
+                                             '/usr/share/doc/sphinx-doc/html/objects.inv'))
+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('matplotlib',
+                                             'http://matplotlib.sourceforge.net/',
+                                             '/usr/share/doc/python-matplotlib-doc/html/objects.inv'))
+intersphinx_mapping.update(check_object_path('numpy',
+                                             'http://docs.scipy.org/doc/numpy/',
+                                             '/usr/share/doc/python-numpy-doc/html/objects.inv'))
+intersphinx_mapping.update(check_object_path('scipy',
+                                             'http://docs.scipy.org/doc/scipy/',
+                                             '/usr/share/doc/python-scipy-doc/html/objects.inv'))
+
+
 # The name of the default domain. Can also be None to disable a
 # default domain. The default is 'py'.
 #primary_domain = 'cf'
@@ -324,8 +348,7 @@ def linkcode_resolve(domain, info):
     #=================================================================
 
 
-    online_source_code = True
-#    online_source_code = False
+    online_source_code = False
 
     if domain != 'py':
         return None

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



More information about the Python-modules-commits mailing list