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
1=== modified file 'setup.py'
2--- setup.py 2011-04-22 17:30:13 +0000
3+++ setup.py 2011-04-26 21:31:04 +0000
4@@ -25,14 +25,18 @@
5 from setuptools import find_packages
6 from setuptools.command.sdist import sdist
7
8+# In order to run the i18n commands for compiling and
9+# installing message catalogs, we use DistUtilsExtra.
10+# Don't make this a hard requirement, but warn that
11+# i18n commands won't be available if DistUtilsExtra is
12+# not installed...
13 try:
14- import DistUtilsExtra.auto
15+ from DistUtilsExtra.auto import setup
16 except ImportError:
17- print >> sys.stderr, 'To build nova you need '\
18- 'https://launchpad.net/python-distutils-extra'
19- sys.exit(1)
20-assert DistUtilsExtra.auto.__version__ >= '2.18',\
21- 'needs DistUtilsExtra.auto >= 2.18'
22+ from setuptools import setup
23+ print "Warning: DistUtilsExtra required to use i18n builders. "
24+ print "To build nova with support for message catalogs, you need "
25+ print " https://launchpad.net/python-distutils-extra >= 2.18"
26
27 gettext.install('nova', unicode=1)
28
29@@ -102,7 +106,7 @@
30 package_data += [(destdir, files)]
31 return package_data
32
33-DistUtilsExtra.auto.setup(name='nova',
34+setup(name='nova',
35 version=version.canonical_version_string(),
36 description='cloud computing fabric controller',
37 author='OpenStack',