Opened 11 years ago
Closed 5 years ago
#71 closed defect (fixed)
python: X:/USR is returned instead of /@unixroot/usr
Reported by: | Yuri Dario | Owned by: | |
---|---|---|---|
Priority: | Feedback Pending | Milestone: | |
Component: | python | Version: | |
Severity: | highest | Keywords: | |
Cc: |
Description
With support for virtual env, now python returns /USR for system path. This breaks installation scripts, because files are not remapped to correct %UNIXROOT% drive but written to default drive.
dmik:
- Fix setup.py machinery so that it leaves the drive letter in, i.e. in your example it should give this:
X:/USR/lib/python2.7/site-packages/urlgrabber/byterange.py
- Fix setup.py machinery so that it replaces X:/USR back with /@unixroot/usr
- Fix dynamic python sys.path detection so that it replaces X:/USR with /@unixroot/usr when it’s run from X:/USR/bin.
I think 3 is the most long term effective solution as it requires less modifications in 3rd party software. If we agree on that I may look back into the place where I fixed it (to make sys.path dynamic and hence fix virtualenv and some other things).
I want to remind that the source of this problem is that /@unixroot is not a real dir on OS/2 but something like a symlink (from the LIBC point of view).
Change History (6)
comment:1 by , 11 years ago
Summary: | python: /USR is returned instead of /@unixroot → python: X:/USR is returned instead of /@unixroot/usr |
---|
comment:2 by , 11 years ago
comment:4 by , 8 years ago
Severity: | → highest |
---|
The same problem is now with yum-utils, I'm going to hardcode unixroot until we fix this ticket.
comment:5 by , 6 years ago
Priority: | major → Feedback Pending |
---|
didn't we fix that in one of the latest python?
comment:6 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
as
python -c 'import sys; print sys.prefix'
brings back /@unixroot/usr I'm pretty sure this is fixed.
I close it. If it's still an issue please reopen.
Something's wrong with permissions here: I could successfully change the title of the ticket but I can't change the description. It should read that python returns X:/USR now instead of /@unixroot/usr at some places. To be exact, at all places that derive from the location of the python executable (before all these places derived from a hardcoded value
/@unixroot/usr/blah
).The change set where hardcoding was removed is r383. The responsible function is
calculate_path()
ingetpath.c
.Note that Yuri has temporarily worked around the issue by replacing
/USR
with/@unixroot/usr
in install scripts in a number of packages:But this is hackish and not scalable (requires manual fix for each affected package which will break if you ever change the installation path). These workarounds need to be undone once this issue is fixed and tested.