Adds a mechanism to programmatically determine the version of Nova. The designated version is defined in nova/version.py. When running python setup.py from a bzr checkout, information about the bzr branch is put into nova/vcsversion.py which is conditionally imported in nova/version.py.
In short, you can now do: >>> import nova.version >>> nova.version.canonical_version_string() '2011.1' >>> nova.version.version_string() '2011.1-dev' >>> nova.version.version_string_with_vcs() u'2011.1-newlog2:soren@linux2go.dk-20110107130049-g2cbri7t80vsg2h1' It's also consumed by the docs and setup.py, so this ought to be the canonical place for updating version information from now on.
This commit is contained in:
@@ -60,10 +60,11 @@ copyright = u'2010, United States Government as represented by the Administrator
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '2011.1'
|
||||
from nova import version as nova_version
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '2011.1-prerelease'
|
||||
release = nova_version.version()
|
||||
# The short X.Y version.
|
||||
version = nova_version.canonical_version_string()
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
Reference in New Issue
Block a user