[issue31114] 'make install' fails when the configure 'prefix' is '/' and DESTDIR is used

Xavier de Gaye report at bugs.python.org
Mon Oct 30 15:56:20 EDT 2017


Xavier de Gaye <xdegaye at gmail.com> added the comment:

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.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31114>
_______________________________________


More information about the Python-bugs-list mailing list