Added ChangeLog generation.

This commit is contained in:
Monty Taylor 2010-07-28 14:37:58 -07:00
parent f61b62983f
commit 7c39435df5
3 changed files with 20 additions and 0 deletions

View File

@ -1,2 +1,3 @@
run_tests.err.log run_tests.err.log
.nova-venv .nova-venv
ChangeLog

View File

@ -1,5 +1,6 @@
include HACKING LICENSE run_tests.py run_tests.sh include HACKING LICENSE run_tests.py run_tests.sh
include README builddeb.sh exercise_rsapi.py include README builddeb.sh exercise_rsapi.py
include ChangeLog
graft CA graft CA
graft doc graft doc
graft smoketests graft smoketests

View File

@ -17,6 +17,23 @@
# under the License. # under the License.
from setuptools import setup, find_packages from setuptools import setup, find_packages
from setuptools.command.sdist import sdist
import os
import subprocess
class local_sdist(sdist):
"""Customized sdist hook - builds the ChangeLog file from VC first"""
def run(self):
if os.path.isdir('.bzr'):
# We're in a bzr branch
log_cmd = subprocess.Popen(["bzr","log","--gnu"],
stdout = subprocess.PIPE)
changelog = log_cmd.communicate()[0]
with open("ChangeLog", "w") as changelog_file:
changelog_file.write(changelog)
sdist.run(self)
setup(name='nova', setup(name='nova',
version='0.9.0', version='0.9.0',
@ -24,6 +41,7 @@ setup(name='nova',
author='OpenStack', author='OpenStack',
author_email='nova@lists.launchpad.net', author_email='nova@lists.launchpad.net',
url='http://www.openstack.org/', url='http://www.openstack.org/',
cmdclass = {'sdist': local_sdist},
packages = find_packages(exclude=['bin','smoketests']), packages = find_packages(exclude=['bin','smoketests']),
scripts=['bin/nova-api', scripts=['bin/nova-api',
'bin/nova-compute', 'bin/nova-compute',