Skip to content

Commit

Permalink
Get rid of distutils.extra.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
emonty committed Feb 9, 2012
1 parent 1815aaf commit 4a4c274
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ nova.egg-info
.venv
*.sqlite
*.log
po/*.pot
po/*.pot
2 changes: 2 additions & 0 deletions babel.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[python: **.py]

23 changes: 23 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,26 @@ source-dir = doc/source
tag_build =
tag_date = 0
tag_svn_revision = 0

[compile_catalog]
directory = locale
domain = nova

[update_catalog]
domain = nova
output_dir = po
input_file = po/nova.pot

[extract_messages]
keywords = _ gettext ngettext
mapping_file = babel.cfg
output_file = po/nova.pot

[nosetests]
verbosity=2
detailed-errors=1
with-openstack=1
openstack-red=0.05
openstack-yellow=0.025
openstack-show-elapsed=1
openstack-color=1
16 changes: 1 addition & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,12 @@
# License for the specific language governing permissions and limitations
# under the License.

import gettext
import glob
import os

from setuptools import find_packages

# 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:
from DistUtilsExtra.auto import setup
except ImportError:
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 setuptools import setup

from nova import version

Expand Down
1 change: 1 addition & 0 deletions tools/pip-requires
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ nosexcover
paramiko
feedparser
pycrypto
Babel>=0.9.6

0 comments on commit 4a4c274

Please sign in to comment.