summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2010-07-29 03:25:03 +0000
committerTarmac <>2010-07-29 03:25:03 +0000
commitefc6317108b09311d6830b333a36714feeb2532b (patch)
treef8770b63f697e4f70cab707f8d69dec1c8e26066 /setup.py
parentf9569be64be5dbc909ac8dcb594d361aea12c97c (diff)
parent49dd0c52c143d86dcdd562ffd764a9f7e3ee8ce0 (diff)
downloadnova-efc6317108b09311d6830b333a36714feeb2532b.tar.gz
nova-efc6317108b09311d6830b333a36714feeb2532b.tar.xz
nova-efc6317108b09311d6830b333a36714feeb2532b.zip
Added ChangeLog generation
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 50d5f2a3d..0fd286f7d 100644
--- a/setup.py
+++ b/setup.py
@@ -17,6 +17,24 @@
# under the License.
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',
version='0.9.1',
@@ -24,7 +42,8 @@ setup(name='nova',
author='OpenStack',
author_email='nova@lists.launchpad.net',
url='http://www.openstack.org/',
- packages = find_packages(exclude=['bin','smoketests']),
+ cmdclass={'sdist': local_sdist},
+ packages=find_packages(exclude=['bin', 'smoketests']),
scripts=['bin/nova-api',
'bin/nova-compute',
'bin/nova-dhcpbridge',
@@ -34,6 +53,4 @@ setup(name='nova',
'bin/nova-network',
'bin/nova-objectstore',
'bin/nova-rsapi',
- 'bin/nova-volume',
- ]
- )
+ 'bin/nova-volume'])