Skip to content

Commit 4a4c274

Browse files
committed
Get rid of distutils.extra.
We moved to DistUtilsExtra because it promised a more automatic workflow from setup.py. It doesn't actually deliver though, and it also vomits warnings during setup.py usage, and also breaks pip integration. So this is going back to babel. Mostly folks shouldn't need to know anything about this. We'll need to update the translations import jobs in Jenkins, and we might need to add a corresponding translations upload job that runs post-merge. Translations installation doesn't fully work - but it actually wasn't fully working before. Getting this part of the project done now though is a pre-requisite for using tox for multi-python testing (tox starts by creating an sdist tarball and then installing it into the venv, which is just 100% broken with DistUtilsExtra) Change-Id: I126e1bcfab0656eab6ca10de67d3d2aaa8b844f3
1 parent 1815aaf commit 4a4c274

File tree

5 files changed

+28
-16
lines changed

5 files changed

+28
-16
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ nova.egg-info
1212
.venv
1313
*.sqlite
1414
*.log
15-
po/*.pot
15+
po/*.pot

babel.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[python: **.py]
2+

setup.cfg

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,26 @@ source-dir = doc/source
77
tag_build =
88
tag_date = 0
99
tag_svn_revision = 0
10+
11+
[compile_catalog]
12+
directory = locale
13+
domain = nova
14+
15+
[update_catalog]
16+
domain = nova
17+
output_dir = po
18+
input_file = po/nova.pot
19+
20+
[extract_messages]
21+
keywords = _ gettext ngettext
22+
mapping_file = babel.cfg
23+
output_file = po/nova.pot
24+
25+
[nosetests]
26+
verbosity=2
27+
detailed-errors=1
28+
with-openstack=1
29+
openstack-red=0.05
30+
openstack-yellow=0.025
31+
openstack-show-elapsed=1
32+
openstack-color=1

setup.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,12 @@
1616
# License for the specific language governing permissions and limitations
1717
# under the License.
1818

19-
import gettext
2019
import glob
2120
import os
2221

2322
from setuptools import find_packages
2423

25-
# In order to run the i18n commands for compiling and
26-
# installing message catalogs, we use DistUtilsExtra.
27-
# Don't make this a hard requirement, but warn that
28-
# i18n commands won't be available if DistUtilsExtra is
29-
# not installed...
30-
try:
31-
from DistUtilsExtra.auto import setup
32-
except ImportError:
33-
from setuptools import setup
34-
print "Warning: DistUtilsExtra required to use i18n builders. "
35-
print "To build nova with support for message catalogs, you need "
36-
print " https://launchpad.net/python-distutils-extra >= 2.18"
37-
38-
gettext.install('nova', unicode=1)
24+
from setuptools import setup
3925

4026
from nova import version
4127

tools/pip-requires

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ nosexcover
3232
paramiko
3333
feedparser
3434
pycrypto
35+
Babel>=0.9.6

0 commit comments

Comments
 (0)