1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Description: 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.
Author: Michael Fladischer <FladischerMichael@fladi.at>
Forwarded: not-needed
Last-Update: 2011-12-27
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -75,13 +75,23 @@
# 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'
|