Improvements for version

- __version__ replaced by get_version/get_release.
  This speeds up loading of the library.
- Added release version to doc header.

Change-Id: I86ca4473b9fc56507131f2f50acdba3b9ae1bd7a
This commit is contained in:
Anton Studenov 2016-10-13 12:02:30 +03:00
parent 4c777edb6b
commit b7e99551c1
3 changed files with 16 additions and 4 deletions

View File

@ -15,6 +15,8 @@
import os
import sys
import pbr
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------
@ -27,6 +29,10 @@ extensions = [
'oslosphinx'
]
version = pbr.version.VersionInfo('os_faults').version_string()
# The full version, including alpha/beta/rc tags.
release = pbr.version.VersionInfo('os_faults').release_string()
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable

View File

@ -1,6 +1,6 @@
=========
OS-Faults
=========
===================
OS-Faults |release|
===================
**OpenStack fault-injection library**

View File

@ -21,7 +21,13 @@ from os_faults.api import error
from os_faults.api import human
from os_faults import registry
__version__ = pbr.version.VersionInfo('os_faults').version_string()
def get_version():
return pbr.version.VersionInfo('os_faults').version_string()
def get_release():
return pbr.version.VersionInfo('os_faults').release_string()
APPDIRS = appdirs.AppDirs(appname='openstack', appauthor='OpenStack')