New submission from Xavier de Gaye:

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.

----------
components: Cross-Build
files: ensurepip_prefix.diff
keywords: patch
messages: 299252
nosy: Alex.Willmer, dstufft, martin.panter, ncoghlan, xdegaye
priority: normal
severity: normal
status: open
title: ensurepip does not honour the value of $(prefix)
type: behavior
versions: Python 3.7
Added file: http://bugs.python.org/file47041/ensurepip_prefix.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31046>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to