Message305248
| 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:20 | xdegaye | set | recipients:
+ xdegaye, pitrou, martin.panter, Alex.Willmer |
| 2017年10月30日 19:56:20 | xdegaye | set | messageid: <1509393380.02.0.213398074469.issue31114@psf.upfronthosting.co.za> |
| 2017年10月30日 19:56:20 | xdegaye | link | issue31114 messages |
| 2017年10月30日 19:56:19 | xdegaye | create |
|