New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trace: $prefix and $exec_prefix improperly replaced on Fedora #65215
Comments
In the --ignore-dir handling of trace.py, the following is done: s = s.replace("$prefix",
os.path.join(sys.base_prefix, "lib",
"python" + sys.version[:3]))
s = s.replace("$exec_prefix",
os.path.join(sys.base_exec_prefix, "lib",
"python" + sys.version[:3])) This does not do what is expected on 64-bit Fedora and newer Debian since the proper directory is /usr/lib64/python2.7 or /usr/lib/$triple/python2.7. Just the libsuffix can't be changed either since Fedora also has /usr/lib/python2.7 for arch-independent modules. It'd be nice if $prefix were replaced with the following directories from sysconfig.get_paths(): platstdlib, platlib, purelib, and stdlib. It also erroneously replaces things like '$prefixpath'. It should probably do split the path on the path separators and only replace components that are equal to |
Thanks Ben Boeckel for the bugfix. Sorry for the delay (6 years)! But it's now fixed in 3.7, 3.8 and master branches. |
Thanks! Should I file a new issue for the other (less urgent) problem mentioned at the bottom or is it not really worth fixing?
|
re.sub() can be used to leave $prefixpath unchanged. Yeah, please open a separed issue. Sorry, I missed this part of the bug report. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: