.pth and .egg-info files in /usr/lib/pymodules/python2.6 are not being processed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python2.6 (Debian) |
Fix Released
|
Unknown
|
|||
python2.6 (Ubuntu) |
Invalid
|
Undecided
|
Barry Warsaw |
Bug Description
Binary package hint: python2.6
On Lucid, .pth and .egg-info files in /usr/lib/
This means that, for instance, bugs in repoze.
I have other examples, but the best quick instructions I have to dupe ATM are these. (1) apt install repoze.what. (2) It is already broken, but just to make sure, edit /usr/lib/
I'm pretty sure I see why this happens. The pymodules directory is added with a .pth file. That goes into lines 152-154 of site.py, in the addpackage module. For reference, that's the last three lines of this snippet.
for line in f:
if line.startswith
if line.startswith
line = line.rstrip()
dir, dircase = makepath(sitedir, line)
if not dircase in known_paths and os.path.
That adds the path to sys.path but does *not* call addsitedir on it, so reading the directory for special files is not recursive. I *think* that's a Python behavior, so I'd prefer not to change it locally, myself.
My naive thought is that pymodules ought to be included within site.addsitepac
Changed in python2.6 (Ubuntu): | |
assignee: | nobody → Barry Warsaw (barry) |
milestone: | none → later |
Changed in python2.6 (Debian): | |
status: | Unknown → New |
Changed in python2.6 (Debian): | |
status: | New → Fix Released |
This is inherited from Debian. Squeeze has exactly the same behavior.