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]))
+
