[Python-modules-commits] [celery] 05/15: use local objects.inv where possible

Michael Fladischer fladi at moszumanska.debian.org
Mon Feb 1 15:50:20 UTC 2016


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

fladi pushed a commit to branch master
in repository celery.

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

    use local objects.inv where possible
    
     Upstream uses intersphinx mappings that fetch the objects.inv for python,
     kombu and django-celery by HTTP from a remote host. Using the local
     objects.inv from python and kombu enables the package to build without
     network connection.
    Forwarded: not-needed
    Last-Update: 2011-12-27
    
    Patch-Name: intersphinx.patch
---
 docs/conf.py | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/docs/conf.py b/docs/conf.py
index 551e7a6..b2722d8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -75,13 +75,23 @@ unused_docs = [
 # If true, '()' will be appended to :func: etc. cross-reference text.
 add_function_parentheses = True
 
-intersphinx_mapping = {
-    'python': ('http://docs.python.org/dev', None),
-    'kombu': ('http://kombu.readthedocs.org/en/latest/', None),
-    'djcelery': ('http://django-celery.readthedocs.org/en/latest', None),
-    'cyme': ('http://cyme.readthedocs.org/en/latest', None),
-    'amqp': ('http://amqp.readthedocs.org/en/latest', 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('kombu',
+                                             'http://kombu.readthedocs.org/en/latest/',
+                                             '/usr/share/doc/python-kombu-doc/html/objects.inv'))
+intersphinx_mapping.update(check_object_path('amqp',
+                                             'http://amqp.readthedocs.org/en/latest/',
+                                             '/usr/share/doc/python-amqp-doc/html/objects.inv'))
 
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = 'colorful'

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



More information about the Python-modules-commits mailing list