[Distutils] Anyone stuck with easy_install / has .pth file issues -- this is for you!
pje at telecommunity.com
Mon May 4 17:20:13 CEST 2009
At 02:43 AM 5/4/2009 -0700, Garrett Cooper wrote:
> Just thought I'd might provide this script to fellow developers
>which fixes .pth files (easy-install.pth / .egg was the prime target
>-- see the comments for more details):
> Comments are more than welcome.
As far as I can tell, it doesn't do anything that "easy_install -mxN"
doesn't, although it appears to also convert paths of this form:
if I'm reading the code correctly. It also seems to have no
protection against adding multiple versions of the same project to a
.pth file, and to ignore development eggs, whether or not their
directories still exist.
In contrast, easy_install already removes non-existent
files/directories whenever it touches easy_install.pth, and if you
gave it a command line globbing the same files as this tool (i.e.,
just "easy_install [list of eggs]"), you'd at least end up without
any duplicates in the .pth file.
In short, AFAICT, you could replace the entire tool with a short note
on how to accomplish the same things using easy_install, or by simply
having it invoke easy_install internally.
More information about the Distutils-SIG