From 52e5a3a766dc01de7750c60d5ae06414647a1b63 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Fri, 5 Feb 2016 16:54:56 +0000 Subject: [PATCH] Add the version.py module This commit is adding the version.py module for ironic-staging-drivers and updating the doc/source/conf.py configuration file to use the new version module. Change-Id: If845ebb4ca35293a1cd4bd1a42e93999cb919777 --- doc/source/conf.py | 11 +++++++++++ ironic_staging_drivers/version.py | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 ironic_staging_drivers/version.py diff --git a/doc/source/conf.py b/doc/source/conf.py index 62bfcc9..0eec75e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -40,6 +40,17 @@ master_doc = 'index' project = u'ironic-staging-drivers' copyright = u'2016, Ironic Staging Drivers Developers ' +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +from ironic_staging_drivers import version as isd_version +# The full version, including alpha/beta/rc tags. +release = isd_version.version_info.release_string() +# The short X.Y version. +version = isd_version.version_info.version_string() + # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True diff --git a/ironic_staging_drivers/version.py b/ironic_staging_drivers/version.py new file mode 100644 index 0000000..74cb5aa --- /dev/null +++ b/ironic_staging_drivers/version.py @@ -0,0 +1,18 @@ +# Copyright 2016 Red Hat, Inc. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import pbr.version + +version_info = pbr.version.VersionInfo('ironic-staging-drivers')