Merge lp:~jaypipes/nova/bug771489 into lp:~hudson-openstack/nova/trunk

Proposed by Jay Pipes
Status: Merged
Approved by: Jay Pipes
Approved revision: 1032
Merged at revision: 1033
Proposed branch: lp:~jaypipes/nova/bug771489
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 37 lines (+11/-7)
1 file modified
setup.py (+11/-7)
To merge this branch: bzr merge lp:~jaypipes/nova/bug771489
Reviewer Review Type Date Requested Status
Rick Harris (community) Approve
Trey Morris (community) Approve
Ken Pepple (community) Approve
Review via email: mp+59135@code.launchpad.net

Commit message

Make the import of distutils.extra non-mandatory in setup.py. Just print a warning that i18n commands are not available...

Description of the change

Make the import of distutils.extra non-mandatory in setup.py. Just print a warning that i18n commands are not available...

To post a comment you must log in.
Revision history for this message
Ken Pepple (ken-pepple) wrote :

`$ python setup.py install` works fine on my mac with this branch (it didn't before)

... note that `$ python setup.py` generates an error later down the way with

  (trouble)k-3:bug771489 kpepple$ python setup.py
  Warning: DistUtilsExtra required to use i18n builders.
  To build nova with support for message catalogs, you need
    https://launchpad.net/python-distutils-extra >= 2.18
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: setup.py --help [cmd1 cmd2 ...]
    or: setup.py --help-commands
    or: setup.py cmd --help

  error: no commands supplied

... but that shouldn't be a showstopper

review: Approve
Revision history for this message
Trey Morris (tr3buchet) wrote :

good deal

review: Approve
Revision history for this message
Rick Harris (rconradharris) wrote :

lgtm, thanks Jay.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'setup.py'
--- setup.py 2011-04-22 17:30:13 +0000
+++ setup.py 2011-04-26 21:31:04 +0000
@@ -25,14 +25,18 @@
25from setuptools import find_packages25from setuptools import find_packages
26from setuptools.command.sdist import sdist26from setuptools.command.sdist import sdist
2727
28# In order to run the i18n commands for compiling and
29# installing message catalogs, we use DistUtilsExtra.
30# Don't make this a hard requirement, but warn that
31# i18n commands won't be available if DistUtilsExtra is
32# not installed...
28try:33try:
29 import DistUtilsExtra.auto34 from DistUtilsExtra.auto import setup
30except ImportError:35except ImportError:
31 print >> sys.stderr, 'To build nova you need '\36 from setuptools import setup
32 'https://launchpad.net/python-distutils-extra'37 print "Warning: DistUtilsExtra required to use i18n builders. "
33 sys.exit(1)38 print "To build nova with support for message catalogs, you need "
34assert DistUtilsExtra.auto.__version__ >= '2.18',\39 print " https://launchpad.net/python-distutils-extra >= 2.18"
35 'needs DistUtilsExtra.auto >= 2.18'
3640
37gettext.install('nova', unicode=1)41gettext.install('nova', unicode=1)
3842
@@ -102,7 +106,7 @@
102 package_data += [(destdir, files)]106 package_data += [(destdir, files)]
103 return package_data107 return package_data
104108
105DistUtilsExtra.auto.setup(name='nova',109setup(name='nova',
106 version=version.canonical_version_string(),110 version=version.canonical_version_string(),
107 description='cloud computing fabric controller',111 description='cloud computing fabric controller',
108 author='OpenStack',112 author='OpenStack',