#11640 closed defect (fixed)
Locale data not included in egg when installing using easy_install
Reported by: | Ryan J Ollos | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.6 |
Component: | general | Version: | 1.0.1 |
Severity: | normal | Keywords: | distribute setuptools |
Cc: | Jun Omae, holger.juergs@… | Branch: | |
Release Notes: |
Fix compiled catalog and javascript message files not included in egg file if using |
||
API Changes: | |||
Internal Changes: |
Description
I was investigating the issue reported in SO:24019549, and encountered a problem with the locale
data not being included in the egg.
The problem is demonstrated in the following:
$ mkdir trac $ cd trac $ virtualenv . > /dev/null $ . bin/activate $ easy_install babel==0.9.6 > /dev/null $ easy_install -v trac > trac_easy_install.log $ ls -d lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac $ ls -d lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac/locale ls: cannot access lib/python2.7/site-packages/Trac-1.0.1-py2.7.egg/trac/locale: No such file or directory
What I see in trac_easy_install.log is:
- The catalogs are being compiled.
- The locale data is not being copied into the
build
directory.
Package versions (Ubuntu 13.04):
$ python --version Python 2.7.4 $ easy_install --version distribute 0.6.34 $ virtualenv --version 1.9.1 $ pip --version pip 1.3.1 from /home/user/Workspace/trac/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg (python 2.7)
I've had success using pip
though:
$ mkdir trac $ cd trac $ virtualenv . > /dev/null $ . bin/activate $ easy_install babel==0.9.6 > /dev/null $ pip install trac > trac_pip_install.log $ $ ls -d lib/python2.7/site-packages/trac/locale lib/python2.7/site-packages/trac/locale
Attachments (1)
Change History (14)
by , 10 years ago
Attachment: | trac_easy_install.log added |
---|
comment:2 by , 10 years ago
Thanks for verifying. I was feeling a bit crazy, thinking that if the issue was real then someone would have reported it by now. I almost always work in the setuptools develop
mode so I had never encountered the issue that I recall.
comment:3 by , 10 years ago
Milestone: | → 0.12.6 |
---|
follow-up: 5 comment:4 by , 10 years ago
We expect that install_lib
command executes self.l10n_run()
method and copies *.py
files, *.mo
files and *.js
messages files to build directory. However, when distribute 0.6.29 and later and install_lib
is executed by bdist_egg
, *.mo
and *.js
files are not copied.
The copied files are stored in data_files
property of build_py
command. It seems that the property is computed before generating *.mo
files when distribute 0.6.29 and later. In proposed changes, remove the property after generating *.mo
files. Then, the property will be re-computed if some code read the property.
Proposed changes in [c5ace6e82/jomae.git] (jomae.git@t11640_0.12) and verified bdist_egg
on Python 2.4 - 2.7 with distribute 0.6.10 and later and setuptools 0.7.8 and later.
follow-up: 6 comment:5 by , 10 years ago
Replying to jomae:
Proposed changes in [c5ace6e82/jomae.git] (jomae.git@t11640_0.12) and verified
bdist_egg
on Python 2.4 - 2.7 with distribute 0.6.10 and later and setuptools 0.7.8 and later.
Thanks for the fix. Verified with distribute 0.6.34 (Ubuntu 13.04) on 0.12-stable.
As for testing more against additional versions of setuptools and distribute, I see that setuptools and distribute are both hosted on BitBucket, so if I find time I'll clone the repositories and test against additional versions like you've done.
Side note regarding continuous integration, I'm hoping we can eventually have build configurations that test each supported version of our package dependencies in a nightly build. This seems like a good case where we could add some additional test coverage and have the build server run the tests against every available version of setuptools
and distribute
that meets our installation requirements.
Do you plan to modify the installation requirements: branches/0.12-stable/setup.py@12663:99#L95?
comment:6 by , 10 years ago
Cc: | added |
---|
Replying to rjollos:
Do you plan to modify the installation requirements: branches/0.12-stable/setup.py@12663:99#L95?
No. But it might be good to modify to setuptools>=0.6.10
on trunk.
Distribution | Python | setuptools |
---|---|---|
CentOS 5 | 2.4.3 | 0.6c5-2.el5 |
CentOS 6 | 2.6.6 | 0.6.10-3.el6 |
Debian squeeze (oldstable) | 2.6.6 | 0.6.14-4 |
Debian wheezy (stable) | 2.7.3 | 0.6.24-1 |
Ubuntu 10.04LTS | 2.6.5 | 0.6.10-4ubuntu1 |
Ubuntu 12.04LTS | 2.7.3 | 0.6.24-1ubuntu1 |
Ubuntu 14.04LTS | 2.7.5 | 3.3-1ubuntu1 |
follow-up: 8 comment:7 by , 10 years ago
Cc: | added |
---|---|
Milestone: | 0.12.6 → 0.12.7 |
upgrading to trac version 1.0 leaves me with a pure trac without localization. I didn't find any documentation on how to bring different languages to run.
This ist the only hint i found.
I'm looking foreward for any progress and hint how to get babel to work. Using pip does not help… (under Windows)
comment:8 by , 10 years ago
Milestone: | 0.12.7 → 0.12.6 |
---|
Replying to holger.juergs@…:
upgrading to trac version 1.0 leaves me with a pure trac without localization. I didn't find any documentation on how to bring different languages to run.
Support and installation questions should be asked on the MailingList or IrcChannel. See InstallationIssue.
comment:9 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
I'll push the proposed changes [c5ace6e82/jomae.git] to 0.12-stable.
comment:10 by , 10 years ago
using babel 0.9.6 as recommended in #11345 and installing trac with pip instead of easyinstall solves the problem for me so far…
comment:11 by , 10 years ago
Verified easy_install Trac-1.0.1.tar.gz
again with Python 2.7.3 and Babel 0.9.6.
Before the patch:
distribute 0.6.10 … 0.6.28 | trac/locale is installed |
---|---|
distribute 0.6.29 … 0.6.49 | trac/locale is not installed |
setuptools 0.8 … 5.4.1 | trac/locale is not installed |
After the patch:
trac/locale is installed on all versions of distribute and setuptools.
comment:12 by , 10 years ago
Keywords: | distribute setuptools added |
---|---|
Release Notes: | modified (diff) |
Resolution: | → fixed |
Status: | assigned → closed |
Committed in [12978] and merged in [12979-12980].
Cannot reproduce on virtualenv 1.7.1.2 and distribute 0.6.24. But the issue is reproduced after distribute is upgraded to 0.6.29 or later.