This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients Alex.Willmer, martin.panter, pitrou, xdegaye
Date 2017-10-30.19:56:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509393380.02.0.213398074469.issue31114@psf.upfronthosting.co.za>
In-reply-to
Content
Actually, sys.prefix is '/usr' because '/usr/bin' is in PATH while '/bin' is not in PATH. After adding '/bin' to the start of PATH, then sys.prefix becomes '/.' when Python is run as 'python3'. The confusion comes from the '/bin' symlink (archlinux is not a perfect choice for those tests). Whatever the value of PATH, '/bin/python3' has also '/.' as its sys.prefix.

So Modules/getpath.c fails to get '/' as the prefix in step 3 of the algorithm described at the top of the source code and uses '/.' (i.e. PREFIX) instead. This is caused by its reduce() function not handling the corner case where Python is installed on '/'. I will update the PR shortly.
History
Date User Action Args
2017-10-30 19:56:20xdegayesetrecipients: + xdegaye, pitrou, martin.panter, Alex.Willmer
2017-10-30 19:56:20xdegayesetmessageid: <1509393380.02.0.213398074469.issue31114@psf.upfronthosting.co.za>
2017-10-30 19:56:20xdegayelinkissue31114 messages
2017-10-30 19:56:19xdegayecreate