You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
trace: $prefix and $exec_prefix improperly replaced on Fedora #65215
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 $prefix or $exec_prefix (so that the '$' can be escaped for directories named as such literally, but that would require a pass to parse the escapes).
Should I file a new issue for the other (less urgent) problem mentioned at the bottom or is it not really worth fixing?
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 $prefix or $exec_prefix (so that the '$' can be escaped for directories named as such literally, but that would require a pass to parse the escapes).
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 $prefix or $exec_prefix (so that the '$' can be escaped for directories named as such literally, but that would require a pass to parse the escapes).
re.sub() can be used to leave $prefixpath unchanged. Yeah, please open a separed issue. Sorry, I missed this part of the bug report.
Activity
mathstuf commentedon Mar 22, 2014
In the --ignore-dir handling of trace.py, the following is done:
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 $prefix or $exec_prefix (so that the '$' can be escaped for directories named as such literally, but that would require a pass to parse the escapes).
vstinner commentedon Feb 12, 2020
New changeset 4fac7ed by Victor Stinner in branch 'master':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
4fac7ed
miss-islington commentedon Feb 12, 2020
New changeset ca133e5 by Miss Islington (bot) in branch '3.7':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
ca133e5
miss-islington commentedon Feb 12, 2020
New changeset ac6f4d2 by Miss Islington (bot) in branch '3.8':
bpo-21016: pydoc and trace use sysconfig (GH-18476)
ac6f4d2
vstinner commentedon Feb 12, 2020
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.
mathstuf commentedon Feb 13, 2020
Thanks!
Should I file a new issue for the other (less urgent) problem mentioned at the bottom or is it not really worth fixing?
vstinner commentedon Feb 13, 2020
re.sub() can be used to leave $prefixpath unchanged. Yeah, please open a separed issue. Sorry, I missed this part of the bug report.