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
bpo-31046: ensurepip does not honour the value of $(prefix)
When cross-compiling, the local Python interpreter that is used
to run `ensurepip` may not have the same value of `sys.prefix` as
the value of the 'prefix' variable that is set in the Makefile.
With the following values used to install Python locally for
a later copy to the files hierarchy owned by the 'termux'
application on an Android device:
DESTDIR=/tmp/android
prefix=/data/data/com.termux/files/usr/local
'make install' causes ensurepip to install pip in
$(DESTDIR)/usr/local instead of the expected $(DESTDIR)/$(prefix)
where is installed the standard library.
The attached patch fixes the problem. The patch was implemented
assuming that pip uses distutils for the installation (note that
setup.py also uses the --prefix option in the Makefile), but I
know nothing about pip so forgive me if the patch is wrong and
please just assume it is just a way to demonstrate the problem.
Fixes: #75229
Fixes: https://bugs.python.org/issue31046
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
References: #17634
Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
0 commit comments