Edgewall Software
Modify

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#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 easy_install and bdist_egg of distribute 0.6.29 and later.

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)

trac_easy_install.log (292.1 KB ) - added by Ryan J Ollos 11 years ago.

Download all attachments as: .zip

Change History (14)

by Ryan J Ollos, 11 years ago

Attachment: trac_easy_install.log added

comment:1 by Jun Omae, 11 years ago

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.

  • distribute 0.6.24 - 0.6.28 … trac/locale is installed
  • distribute 0.6.29 - 0.6.49 … trac/locale is not installed
  • setuptools 4.0.1 … trac/locale is not installed
Last edited 11 years ago by Jun Omae (previous) (diff)

comment:2 by Ryan J Ollos, 11 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 Ryan J Ollos, 11 years ago

Milestone: 0.12.6

comment:4 by Jun Omae, 11 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.

in reply to:  4 ; comment:5 by Ryan J Ollos, 11 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?

in reply to:  5 comment:6 by Jun Omae, 11 years ago

Cc: Jun Omae 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

comment:7 by holger.juergs@…, 10 years ago

Cc: holger.juergs@… added
Milestone: 0.12.60.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)

in reply to:  7 comment:8 by Jun Omae, 10 years ago

Milestone: 0.12.70.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 Jun Omae, 10 years ago

Owner: set to Jun Omae
Status: newassigned

I'll push the proposed changes [c5ace6e82/jomae.git] to 0.12-stable.

comment:10 by holger.juergs@…, 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 Jun Omae, 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.

Last edited 10 years ago by Jun Omae (previous) (diff)

comment:12 by Jun Omae, 10 years ago

Keywords: distribute setuptools added
Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [12978] and merged in [12979-12980].

comment:13 by Jun Omae, 10 years ago

#11047 was marked as duplicate.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.