summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2012-07-02 14:58:10 -0700
committerMonty Taylor <mordred@inaugust.com>2012-07-11 12:26:14 -0500
commit7618feaeb12c4128ebe31ed7af3110d15746d0d7 (patch)
treecf700bd11388acc1759991eacfa71891d8acf0cd /doc
parentc2a3fc56fc32b55f06798012fa5e74891acb533a (diff)
downloadpython-swiftclient-7618feaeb12c4128ebe31ed7af3110d15746d0d7.tar.gz
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
Diffstat (limited to 'doc')
-rw-r--r--doc/source/conf.py7
1 files changed, 4 insertions, 3 deletions
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.