diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-26 14:13:04 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-26 14:13:04 -0400 |
commit | 7f34f6b89c5d44f96856adfcea30a47d525f4c64 (patch) | |
tree | 43364bbe2c23497ea113c1a8d8f2cf8c35854dc7 /doc/conf.py | |
parent | 552fa7b683dcdcbbc58dc2871e31f54d8db14a64 (diff) | |
download | bcfg2-7f34f6b89c5d44f96856adfcea30a47d525f4c64.tar.gz bcfg2-7f34f6b89c5d44f96856adfcea30a47d525f4c64.tar.bz2 bcfg2-7f34f6b89c5d44f96856adfcea30a47d525f4c64.zip |
wrote docs for Bcfg2.Compat
Diffstat (limited to 'doc/conf.py')
-rw-r--r-- | doc/conf.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/conf.py b/doc/conf.py index 7fc10ad61..538cd236d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -254,7 +254,20 @@ def setup(app): app.connect('autodoc-skip-member', skip_member_from_docstring) # intersphinx settings -intersphinx_mapping = dict( - py=('http://docs.python.org/%s' % '.'.join(str(v) - for v in sys.version_info[0:2]), - None)) + +# generate intersphinx mappings for all versions of python we support; +# the default will be the version of python this is built with. +# Python only started using sphinx in 2.6, so we won't have docs for +# 2.4 or 2.5. These are in reverse order, since sphinx seems to look +# in the last mapping first. +versions = ["3.2", "2.7", "2.6"] +cur_version = '.'.join(str(v) for v in sys.version_info[0:2]) + +intersphinx_mapping = dict() +for pyver in versions: + if pyver == cur_version: + key = 'py' + else: + key = 'py' + pyver.replace(".", "") + intersphinx_mapping[key] = ('http://docs.python.org/%s' % pyver, + None) |