[Distutils] patch: solving the two major things that people dislike about setuptools, part 1

Phillip J. Eby pje at telecommunity.com
Tue Nov 25 01:20:11 CET 2008


At 05:46 PM 11/24/2008 -0500, Mark Sienkiewicz wrote:
>As far as I can tell, the *only* purpose of __egginsert is to permit 
>the incorrect behaviour that your patch is intended to fix.

The behavior isn't incorrect; it's by design.  If you don't want that 
behavior, just install everything using "-m" (aka 
--multi-version).  The eggs will then not be listed in .pth files, 
but any scripts installed by setuptools (including those installed 
via "setup.py develop") will still load the correct eggs at runtime.

For code not built with setuptools, you'll need to use 
pkg_resources.require() to add the eggs to sys.path dynamically.

Please note that I've rejected Zooko's patch, because it makes it 
impossible to ensure that an easy_install-ed package takes precedence 
over an existing, distutils-installed version of the same package in 
the same PYTHONPATH directory.  This is the intended default behavior 
of easy_install; if you wish to override it, you should use 
--multi-version, and explicitly select the egg(s) to be added to 
sys.path instead. 



More information about the Distutils-SIG mailing list