python / cpython

The Python programming language
https://www.python.org
Other
63.49k stars 30.4k forks source link

"make install" will not install pip if already present in user site-packages #68606

Open pitrou opened 9 years ago

pitrou commented 9 years ago
BPO 24418
Nosy @ncoghlan, @pitrou, @ned-deily, @asmeurer, @dstufft

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields: ```python assignee = None closed_at = None created_at = labels = ['type-bug', 'build'] title = '"make install" will not install pip if already present in user site-packages' updated_at = user = 'https://github.com/pitrou' ``` bugs.python.org fields: ```python activity = actor = 'ned.deily' assignee = 'none' closed = False closed_date = None closer = None components = ['Build'] creation = creator = 'pitrou' dependencies = [] files = [] hgrepos = [] issue_num = 24418 keywords = [] message_count = 3.0 messages = ['245078', '245079', '245081'] nosy_count = 5.0 nosy_names = ['ncoghlan', 'pitrou', 'ned.deily', 'Aaron.Meurer', 'dstufft'] pr_nums = [] priority = 'normal' resolution = None stage = 'needs patch' status = 'open' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue24418' versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6'] ```

pitrou commented 9 years ago

This is what happens when building Python with conda-build (which implies doing "make install" with a custom prefix):

[...] if test "xupgrade" != "xno" ; then \ case upgrade in \ upgrade) ensurepip="--upgrade" ;; \ install|*) ensurepip="" ;; \ esac; \ LD_LIBRARY_PATH=/home/antoine/miniconda3/conda-bld/work/cpython-default ./python -E -m ensurepip \ $ensurepip --root=/ ; \ fi Ignoring indexes: https://pypi.python.org/simple/ Requirement already up-to-date: setuptools in /home/antoine/.local/lib/python3.5/site-packages Requirement already up-to-date: pip in /home/antoine/.local/lib/python3.5/site-packages [...]

Note that conda-build *does* set PYTHONNOUSERSITE to make builds as isolated as possible, but the Python Makefile deliberately ignores it using "python -E"!

dstufft commented 9 years ago

We should probably pass -s to the ensurepip call.

Adding 2.7 here as well because I think this will probably affect more than just the Makefile, probably the Windows installers and OSX installers too.

pitrou commented 9 years ago

Do we need to add Steve and Ned for the installers?