Introduce __version__ and __version_info__

Ported from stable/0.2 branch.

Change-Id: I090d96efb62ab72cac39a76a897d563199adbf36
This commit is contained in:
Dmitry Tantsur 2015-01-06 11:33:55 +01:00
parent 4a7c33f1d4
commit 92d2e39da7
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,15 @@
# 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.
__version_info__ = (1, 0, 0)
__version__ = '%d.%d.%d' % __version_info__

View File

@ -8,9 +8,13 @@ with open('requirements.txt', 'r') as fp:
for line in fp if line.strip()]
with open('ironic_discoverd/__init__.py', 'rb') as fp:
exec(fp.read())
setup(
name = "ironic-discoverd",
version = "1.0.0",
version = __version__,
description = open('README.rst', 'r').readline().strip(),
author = "Dmitry Tantsur",
author_email = "dtantsur@redhat.com",