Update setting version from pbr

This patch changes how we set/get the version
for the client using the pbr mechanism.
This commit is contained in:
Walter A. Boring IV 2019-06-14 13:08:22 +00:00
parent 6eb5034202
commit c2cb3818d0
2 changed files with 17 additions and 30 deletions

View File

@ -10,24 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
#
# rbd_iscsi_client documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#
import pbr.version
# -- General configuration ---------------------------------------------
@ -56,7 +39,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'RBD iSCSI Client'
project = u'rbd-iscsi-client'
copyright = u"2019, Walter A. Boring IV"
author = u"Walter A. Boring IV"
@ -65,6 +48,9 @@ author = u"Walter A. Boring IV"
# the built documents.
#
# The short X.Y version.
version_info = pbr.version.VersionInfo('rbd-iscsi-client')
version = version_info.version_string()
release = version_info.release_string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -95,16 +81,7 @@ todo_include_todos = False
#
html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# -- Options for HTMLHelp output ---------------------------------------

View File

@ -10,6 +10,16 @@
# License for the specific language governing permissions and limitations
# under the License."""Top-level package for RBD iSCSI Client."""
import pbr.version
__all_ = ['__version__']
__author__ = """Walter A. Boring IV"""
__email__ = 'waboring@hemna.com'
__version__ = '0.1.0'
version_info = pbr.version.VersionInfo('rbd-iscsi-client')
try:
__version__ = version_info.version_string()
except AttributeError:
__version__ = None