Fixed pep8 issues in setup.py - thanks redbo.

This commit is contained in:
Monty Taylor
2010-07-28 16:05:17 -07:00
parent 64320cf43a
commit 2e84663260

View File

@@ -22,14 +22,15 @@ from setuptools.command.sdist import sdist
import os import os
import subprocess import subprocess
class local_sdist(sdist): class local_sdist(sdist):
"""Customized sdist hook - builds the ChangeLog file from VC first""" """Customized sdist hook - builds the ChangeLog file from VC first"""
def run(self): def run(self):
if os.path.isdir('.bzr'): if os.path.isdir('.bzr'):
# We're in a bzr branch # We're in a bzr branch
log_cmd = subprocess.Popen(["bzr","log","--gnu"], log_cmd = subprocess.Popen(["bzr", "log", "--gnu"],
stdout = subprocess.PIPE) stdout=subprocess.PIPE)
changelog = log_cmd.communicate()[0] changelog = log_cmd.communicate()[0]
with open("ChangeLog", "w") as changelog_file: with open("ChangeLog", "w") as changelog_file:
changelog_file.write(changelog) changelog_file.write(changelog)
@@ -41,8 +42,8 @@ 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}, 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',
'bin/nova-dhcpbridge', 'bin/nova-dhcpbridge',
@@ -52,6 +53,4 @@ setup(name='nova',
'bin/nova-network', 'bin/nova-network',
'bin/nova-objectstore', 'bin/nova-objectstore',
'bin/nova-rsapi', 'bin/nova-rsapi',
'bin/nova-volume', 'bin/nova-volume'])
]
)