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, dstufft, martin.panter, ncoghlan, xdegaye
Date 2017-07-26.16:39:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501087168.72.0.253170854096.issue31046@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-07-26 16:39:28xdegayesetrecipients: + xdegaye, ncoghlan, martin.panter, dstufft, Alex.Willmer
2017-07-26 16:39:28xdegayesetmessageid: <1501087168.72.0.253170854096.issue31046@psf.upfronthosting.co.za>
2017-07-26 16:39:28xdegayelinkissue31046 messages
2017-07-26 16:39:28xdegayecreate