Let all version info be read from the setup.cfg

The Openstack project should follow this style, which forces all
version information being read from the setup.cfg. This helps
keep the version information unique.

Ref can be found at: http://docs.openstack.org/developer/pbr/

Change-Id: Ied7043863b6677487f96fc8f1600ecef0e10818d
Closes-Bug: #1526130
This commit is contained in:
Baohua Yang 2015-12-14 03:00:18 -06:00
parent 4992cf884b
commit d63fd9e432
3 changed files with 20 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import os
from oslo_config import cfg
from kuryr import i18n
from kuryr import version
_ = i18n._
@ -81,4 +82,4 @@ CONF.register_opts(binding_opts, 'binding')
def init(args, **kwargs):
cfg.CONF(args=args, project='kuryr',
version='0.1', **kwargs)
version=version.version_info.release_string(), **kwargs)

17
kuryr/version.py Normal file
View File

@ -0,0 +1,17 @@
# Copyright 2015 OpenStack Foundation
#
# 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('kuryr')

View File

@ -1,5 +1,6 @@
[metadata]
name = kuryr
version = 0.1.0
summary = Docker for Openstack Neutron
description-file =
README.rst