Added babel/gettext build support.

This commit is contained in:
Monty Taylor 2011-01-10 11:26:38 -08:00
parent 6251fbd337
commit b9d0271483
4 changed files with 2159 additions and 2 deletions

2
babel.cfg Normal file
View File

@ -0,0 +1,2 @@
[python: **.py]

2130
locale/nova.pot Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,3 +8,17 @@ tag_build =
tag_date = 0
tag_svn_revision = 0
[compile_catalog]
directory = locale
domain = nova
[update_catalog]
domain = nova
output_dir = locale
input_file = locale/nova.pot
[extract_messages]
keywords = _ l_ lazy_gettext
mapping_file = babel.cfg
output_file = locale/nova.pot

View File

@ -57,14 +57,25 @@ class local_sdist(sdist):
changelog_file.write(str_dict_replace(changelog, mailmap))
sdist.run(self)
nova_cmdclass= { 'sdist': local_sdist,
'build_sphinx' : local_BuildDoc }
try:
from babel.messages import frontend as babel
nova_cmdclass['compile_catalog'] = babel.compile_catalog
nova_cmdclass['extract_messages'] = babel.extract_messages
nova_cmdclass['init_catalog'] = babel.init_catalog
nova_cmdclass['update_catalog'] = babel.update_catalog
except:
pass
setup(name='nova',
version=version.canonical_version_string(),
description='cloud computing fabric controller',
author='OpenStack',
author_email='nova@lists.launchpad.net',
url='http://www.openstack.org/',
cmdclass={ 'sdist': local_sdist,
'build_sphinx' : local_BuildDoc },
cmdclass=nova_cmdclass,
packages=find_packages(exclude=['bin', 'smoketests']),
include_package_data=True,
test_suite='nose.collector',