Update to latest oslo-version

In support of tag-based versioning, update to latest oslo-version code.

Change-Id: I11e85bbfb67e42628cbb13ba5294047960600eae
This commit is contained in:
Monty Taylor 2013-02-04 09:35:51 +11:00
parent c61bd41ab6
commit f6ae203c98
4 changed files with 8 additions and 44 deletions

View File

@ -117,9 +117,9 @@ def _run_shell_command(cmd, throw_on_error=False):
output = subprocess.Popen(["/bin/sh", "-c", cmd],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out = output.communicate()
if output.returncode and throw_on_error:
raise Exception("%s returned %d" % cmd, output.returncode)
out = output.communicate()
if len(out) == 0:
return None
if len(out[0].strip()) == 0:
@ -131,7 +131,7 @@ def write_git_changelog():
"""Write a changelog based on the git changelog."""
new_changelog = 'ChangeLog'
if not os.getenv('SKIP_WRITE_GIT_CHANGELOG'):
if os.path.isdir('.git'):
if os.path.exists('.git'):
git_log_cmd = 'git log --stat'
changelog = _run_shell_command(git_log_cmd)
mailmap = parse_mailmap()
@ -147,7 +147,7 @@ def generate_authors():
old_authors = 'AUTHORS.in'
new_authors = 'AUTHORS'
if not os.getenv('SKIP_GENERATE_AUTHORS'):
if os.path.isdir('.git'):
if os.path.exists('.git'):
# don't include jenkins email address in AUTHORS file
git_log_cmd = ("git log --format='%aN <%aE>' | sort -u | "
"egrep -v '" + jenkins_email + "'")
@ -279,7 +279,7 @@ def _get_version_from_git(pre_version):
revision if there is one, or tag plus number of additional revisions
if the current revision has no tag."""
if os.path.isdir('.git'):
if os.path.exists('.git'):
if pre_version:
try:
return _run_shell_command(

View File

@ -1,25 +0,0 @@
# -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# 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 information for ceilometer.
"""
from ceilometer.openstack.common import version as common_version
NEXT_VERSION = '2013.1'
version_info = common_version.VersionInfo('ceilometer')

View File

@ -24,8 +24,6 @@ sys.path.insert(0, BASE_DIR)
# This is required for ReadTheDocs.org, but isn't a bad idea anyway.
os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'
import ceilometer.version
def write_autodoc_index():
@ -173,16 +171,6 @@ master_doc = 'index'
project = u'Ceilometer'
copyright = u'2013, OpenStack, LLC'
# 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.
#version = '0.0'
from ceilometer.version import version_info as ceilometer_version
release = ceilometer_version.version_string_with_vcs()
version = ceilometer_version.canonical_version_string()
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None

View File

@ -22,10 +22,11 @@ import os
import setuptools
from ceilometer.openstack.common import setup as common_setup
from ceilometer.version import NEXT_VERSION
requires = common_setup.parse_requirements(['tools/pip-requires'])
depend_links = common_setup.parse_dependency_links(['tools/pip-requires'])
project = 'ceilometer'
version = common_setup.get_version(project, '2013.1')
url_base = 'http://tarballs.openstack.org/ceilometer/ceilometer-%s.tar.gz'
@ -38,7 +39,7 @@ def directories(target_dir):
setuptools.setup(
name='ceilometer',
version=NEXT_VERSION,
version=version,
description='cloud computing metering',
@ -46,7 +47,7 @@ setuptools.setup(
author_email='ceilometer@lists.launchpad.net',
url='https://launchpad.net/ceilometer',
download_url=url_base % NEXT_VERSION,
download_url=url_base % version,
classifiers=[
'Development Status :: 3 - Alpha',