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
|
Description: use local object inventory files for sphinx
Author: Sebastian Ramacher <s.ramacher@debian.org>
Forwarded: not-needed
Last-Update: 2013-03-24
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -208,7 +208,15 @@
[u'Armin Ronacher'], 1)
]
-intersphinx_mapping = {
- 'http://docs.python.org/dev': None,
- 'http://flask.pocoo.org/docs': 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%d.%d/html/objects.inv' % \
+ sys.version_info[:2]))
+
|