summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorNaveed Massjouni <naveedm9@gmail.com>2011-05-25 03:18:00 -0400
committerNaveed Massjouni <naveedm9@gmail.com>2011-05-25 03:18:00 -0400
commitc5278be5e8e77e6af14e2ba8005ab1874194b77a (patch)
treeefec4edae95e9a4725d7402b5097e2f48570c854 /setup.py
parent65595766706631a5c65193cfc0fa2ac9de1aeffc (diff)
parente1795bd73c71a20290bc988c410e0cc30afe6bd8 (diff)
Merge from trunk.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 6c45109bc..c165f40d7 100644
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import gettext
import glob
import os
import subprocess
@@ -24,15 +25,20 @@ import sys
from setuptools import find_packages
from setuptools.command.sdist import sdist
+# In order to run the i18n commands for compiling and
+# installing message catalogs, we use DistUtilsExtra.
+# Don't make this a hard requirement, but warn that
+# i18n commands won't be available if DistUtilsExtra is
+# not installed...
try:
- import DistUtilsExtra.auto
+ from DistUtilsExtra.auto import setup
except ImportError:
- print >> sys.stderr, 'To build nova you need '\
- 'https://launchpad.net/python-distutils-extra'
- sys.exit(1)
-assert DistUtilsExtra.auto.__version__ >= '2.18',\
- 'needs DistUtilsExtra.auto >= 2.18'
+ from setuptools import setup
+ print "Warning: DistUtilsExtra required to use i18n builders. "
+ print "To build nova with support for message catalogs, you need "
+ print " https://launchpad.net/python-distutils-extra >= 2.18"
+gettext.install('nova', unicode=1)
from nova.utils import parse_mailmap, str_dict_replace
from nova import version
@@ -100,7 +106,7 @@ def find_data_files(destdir, srcdir):
package_data += [(destdir, files)]
return package_data
-DistUtilsExtra.auto.setup(name='nova',
+setup(name='nova',
version=version.canonical_version_string(),
description='cloud computing fabric controller',
author='OpenStack',