summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-04-13 18:19:41 +0200
committerJulian Andres Klode <jak@debian.org>2009-04-13 18:19:41 +0200
commit6c3e74bdf3a8bd6aced0a2ddb38c1cc7b22ec655 (patch)
tree590dae39fa870a4af07b45a8899e46a12752fcc9 /doc
parent23d29169c30b2f05a0c2943832a7cf7288ff5802 (diff)
downloadpython-apt-6c3e74bdf3a8bd6aced0a2ddb38c1cc7b22ec655.tar.gz
* doc/source/conf.py: Do not require python-debian anymore
Try to get the release from the information in the environment variable DEBVER, which is exported in debian/rules. If it is not set, use python-debian to read the release from the changelog.
Diffstat (limited to 'doc')
-rw-r--r--doc/source/conf.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 40154a6f..52c8a21b 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -60,13 +60,16 @@ copyright = u'2009, Julian Andres Klode <jak@debian.org>'
# |version| and |release|, also used in various other places throughout the
# built documents.
#
-from debian_bundle.changelog import Changelog
-changes = Changelog(open('../../debian/changelog'))
-# The short X.Y version.
-version = '.'.join(changes.full_version.split('.')[:2])
-# The full version, including alpha/beta/rc tags.
-release = changes.full_version
+try:
+ release=os.environ['DEBVER']
+except KeyError:
+ from debian_bundle.changelog import Changelog
+ changes = Changelog(open('../../debian/changelog'))
+ # The full version, including alpha/beta/rc tags.
+ release = changes.full_version
+
+version = '.'.join(release.split('.')[:3])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.