From 7618feaeb12c4128ebe31ed7af3110d15746d0d7 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 2 Jul 2012 14:58:10 -0700 Subject: Consume version info from pkg_resources. Documenation builds specify a version in doc/source/conf.py that is used in appropriate places through out the documentation. Previously this value had not been defined properly and documentation builds failed. Retrieve the version info using pkg_resources and set it properly. Use openstack.common.version to consume the generated version information for documentation. Additional, add a swiftclient.__version__ member which will return the version of swiftclient being used. Change-Id: I14f3abdf00da3f9ea7d0651efe76b08f69ddabae --- doc/source/conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc/source/conf.py') diff --git a/doc/source/conf.py b/doc/source/conf.py index 86a8c58..3c577a7 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -53,10 +53,11 @@ copyright = u'2012 OpenStack, LLC.' # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -version = '.'.join(str(v) for v in swiftclient.version_info[:-1]) +from swiftclient.version import version_info as swiftclient_version # The full version, including alpha/beta/rc tags. -release = swiftclient.version +release = swiftclient_version.version_string() +# The short X.Y version. +version = swiftclient_version.canonical_version_string() # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. -- cgit v1.2.1