Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431278 - dev-python/Babel does not install /usr/bin/pybabel
Summary: dev-python/Babel does not install /usr/bin/pybabel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Cédric Krier
URL:
Whiteboard:
Keywords: PATCH
Depends on: 436292
Blocks:
  Show dependency tree
 
Reported: 2012-08-13 19:37 UTC by Ben Kohler
Modified: 2012-12-19 19:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Babel-force-setuptools.patch (Babel-force-setuptools.patch,441 bytes, patch)
2012-08-13 19:59 UTC, Ben Kohler
Details | Diff
setuptools-0.6.21-r1.ebuild.diff (setuptools-0.6.21-r1.ebuild.diff,2.22 KB, patch)
2012-09-06 17:17 UTC, Julian Ospald
Details | Diff
Babel-0.9.6-r1.ebuild.diff (Babel-0.9.6-r1.ebuild.diff,1.01 KB, patch)
2012-09-06 17:18 UTC, Julian Ospald
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Kohler gentoo-dev 2012-08-13 19:37:06 UTC
When a user does "emerge dev-python/Babel" from a fresh gentoo install, an incomplete Babel package will be "successfully" installed (emerge reports success), due to an undetected failure related to setuptools.


Reproducible: Always

Steps to Reproduce:
1. start with a fresh gentoo
2. emerge dev-python/Babel
3. qlist dev-python/Babel

Actual Results:  
resulting install is missing the following files, when compared to one that is built AFTER setuptools is fixed:

> /usr/lib64/python2.7/site-packages/Babel-0.9.6-py2.7.egg-info/PKG-INFO
> /usr/lib64/python2.7/site-packages/Babel-0.9.6-py2.7.egg-info/SOURCES.txt
> /usr/lib64/python2.7/site-packages/Babel-0.9.6-py2.7.egg-info/not-zip-safe
> /usr/lib64/python2.7/site-packages/Babel-0.9.6-py2.7.egg-info/top_level.txt
> /usr/lib64/python2.7/site-packages/Babel-0.9.6-py2.7.egg-info/entry_points.txt
> /usr/lib64/python2.7/site-packages/Babel-0.9.6-py2.7.egg-info/dependency_links.txt
> /usr/bin/pybabel
> /usr/bin/pybabel-2.7



The dev-python/Babel build system is not detecting when setuptools is broken or missing.  It successfully emerges but does not include /usr/bin/pybabel, among other things.

"Just run python-updater" you say, which makes sense.  This will fix setuptools but Babel remains broken.  The Babel breakage is not detected, ever. You only notice it when a bigger package has pulled in Babel, and this package mysteriously fails due to missing pybabel.  What WILL fix it, is python-updater THEN a blind rebuild of dev-python/Babel.  

I believe the dev-python/Babel build should die when setuptools is missing or broken, rather than reporting success & doing an incomplete install.

Real-world example:  user runs "emerge wicd" from a fresh install, and the wicd package fails due to missing pybabel.  So the user runs python-updater, and it rebuilds some stuff successfully.  He tries "emerge wicd" again, but it still fails due to missing pybabel.  But python-updater says we're clean!

To complicate matters more, wicd's build doesn't immediately die when pybabel is missing, it fails much later when trying to merge missing files... but that's another story (bug?) for another day! =)
Comment 1 Ben Kohler gentoo-dev 2012-08-13 19:59:01 UTC
Created attachment 321240 [details, diff]
Babel-force-setuptools.patch

It seems that Babel's setup.py has a fallback on distutils setup, if setuptools setup is missing/broken.  But this fallback doesn't work for Babel.  Attached patch to cut that out and make it enforce setuptools.

Not sure how "proper" this is, but it would force the user to run python-updater before ever installing Babel, rather than allowing him to install the incomplete copy w/o error.
Comment 2 Julian Ospald 2012-09-06 14:53:11 UTC
I would suggest to migrate setuptools to python-distutils-ng.eclass which will allow us to force installation for particular python-versions from within babel (thanks to the use_expand stuff), like

DEPEND="dev-python/setuptools[python_targets_python2_7]"
Comment 3 Ben Kohler gentoo-dev 2012-09-06 15:55:19 UTC
Reported upstream here:
http://babel.edgewall.org/ticket/313

They echo the suggestion to just cut out the distutils setup fallback from setup.py as a temporary workaround, with the possibility to later add a --without-setuptools option, that can be passed IF it should be allowed to use distutils (and create a no-pybabel installation).
Comment 4 Julian Ospald 2012-09-06 17:17:50 UTC
Created attachment 323092 [details, diff]
setuptools-0.6.21-r1.ebuild.diff

revbump for python-distutils-ng.eclass
Comment 5 Julian Ospald 2012-09-06 17:18:26 UTC
Created attachment 323094 [details, diff]
Babel-0.9.6-r1.ebuild.diff

revbump for python-distutils-ng.eclass
Comment 6 Julian Ospald 2012-09-26 01:16:11 UTC
since no one took care of this

+  26 Sep 2012; Julian Ospald <hasufell@gentoo.org> Babel-0.9.6.ebuild,
+  +files/Babel-0.9.6-setuptools.patch:
+  remove distutils fallback which is broken, thus enforcing usage of setuptools wrt #431278


I would still recommend to migrate both ebuilds, but that should be decided by the python herd.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-12-19 19:37:56 UTC
Babel is now migrated to distutils-r1 and has a USE-dep on setuptools. This should effectively fix it.