From 6c3e74bdf3a8bd6aced0a2ddb38c1cc7b22ec655 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 13 Apr 2009 18:19:41 +0200 Subject: * 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. --- doc/source/conf.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'doc') 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 ' # |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. -- cgit v1.2.3