[Python-modules-commits] [django-assets] 04/17: use local objects.inv where possible
Michael Fladischer
fladi at moszumanska.debian.org
Mon Aug 29 10:19:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch master
in repository django-assets.
commit e92257594568b53f716b6ae333f535282050a4fd
Author: Michael Fladischer <fladi at debian.org>
Date: Thu Oct 8 08:49:21 2015 -0700
use local objects.inv where possible
Upstream uses intersphinx mappings that fetch the objects.inv for python
and webassets by HTTP from a remote host. Using the local objects.inv from
python and webassets enables the package to build without network connection.
Forwarded: not-needed
Last-Update: 2015-06-24
Patch-Name: 02-intersphinx.patch
---
docs/conf.py | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index d0bf13d..ab26a53 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -251,10 +251,21 @@ texinfo_documents = [
WEBASSETS_DOC_URL = 'http://elsdoerfer.name/docs/webassets/'
-intersphinx_mapping = {
- 'python': ('http://docs.python.org/', None),
- 'webassets': (WEBASSETS_DOC_URL, 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('webassets',
+ WEBASSETS_DOC_URL,
+ '/usr/share/doc/python-webassets-doc/html/objects.inv'))
+
extlinks = {'webassets': (WEBASSETS_DOC_URL+'%s.html', None)}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-assets.git
More information about the Python-modules-commits
mailing list