Re: [Distutils] Anyone stuck with easy_install / has .pth file issues -- this is for you!
At 01:11 PM 5/4/2009 -0700, Garrett Cooper wrote:
You're right -- it doesn't protect against the following (><):
/full/path/to/package.egg ./package.egg
By duplicates, I meant 'package-1.0.egg' and 'package-1.1.egg', not alternate paths to the same file. (As for the '.' replacement, you might want to look at what I said more closely.)
BTW, wasn't -m deprecated?
No.
I mean, -m's `delivered' functionality doesn't even work
You'll need to be more specific there: I don't know what you're saying "doesn't work", let alone *how*, what behavior you expect, or what you're seeing instead.
because python stores all loaded package / module entries in .pth files as keys in a dictionary _anyhow_
I also don't know what you mean here. .pth file contents are added to sys.path, not a dictionary. Unless you're talking about sys.path_importer_cache or something, in which case I still don't see the connection to anything else at hand.
I have no idea how -xN factor into this though
The original docs said to use -m before uninstalling, but they really should say -mxN to exclude scripts and avoid installing (or uninstalling!) dependencies. The docs are broken (or at any rate, suboptimal) and should be fixed.
- The duplicates erasure was just gravy, and purely an exercise on my part getting used to set's in python. The real point was the missing package in .pth functionality, caused by easy_install / setuptools lacking proper MP-safe logic.
I'm going to guess that by "MP" you mean multiprocessing, in which case I would say, yes, easy_install assumes that you are not running multiple simultaneous installations to the same directory.
On Mon, May 4, 2009 at 1:46 PM, P.J. Eby
At 01:11 PM 5/4/2009 -0700, Garrett Cooper wrote:
You're right -- it doesn't protect against the following (><):
/full/path/to/package.egg ./package.egg
By duplicates, I meant 'package-1.0.egg' and 'package-1.1.egg', not alternate paths to the same file.
(As for the '.' replacement, you might want to look at what I said more closely.)
Yeah, I realize where I screwed up now. Thanks :).
BTW, wasn't -m deprecated?
No.
Ah, you're right. Maybe that was another option...
I mean, -m's `delivered' functionality doesn't even work
You'll need to be more specific there: I don't know what you're saying "doesn't work", let alone *how*, what behavior you expect, or what you're seeing instead.
Well, if egg 1 and egg 2 define the same module, then the 1st egg's
copy of the module will be loaded and not the second, regardless of
the version criteria defined in the .egg, because sys.modules uses a
dictionary for storage:
[gcooper@orangebox /usr/home/gcooper]$ python -c 'import sys; print
sys.modules'
{'copy_reg':
because python stores all loaded package / module entries in .pth files as keys in a dictionary _anyhow_
I also don't know what you mean here. .pth file contents are added to sys.path, not a dictionary. Unless you're talking about sys.path_importer_cache or something, in which case I still don't see the connection to anything else at hand.
It turned into a bikeshed item I suppose, but that was what I was stating about the -m option... meh.
I have no idea how -xN factor into this though
The original docs said to use -m before uninstalling, but they really should say -mxN to exclude scripts and avoid installing (or uninstalling!) dependencies. The docs are broken (or at any rate, suboptimal) and should be fixed.
Ah, ok. Cool -- thanks :).
- The duplicates erasure was just gravy, and purely an exercise on my part getting used to set's in python. The real point was the missing package in .pth functionality, caused by easy_install / setuptools lacking proper MP-safe logic.
I'm going to guess that by "MP" you mean multiprocessing, in which case I would say, yes, easy_install assumes that you are not running multiple simultaneous installations to the same directory.
Yesh... that's the problem -- but why should I have to run easy_install twice :\? Thanks for the feedback! -Garrett
participants (2)
-
Garrett Cooper
-
P.J. Eby