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.

classification
Title: "make altinstall && make install" behaviour differs from "make install"
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, larry, ncoghlan, ned.deily
Priority: high Keywords:

Created on 2013-11-22 14:39 by ncoghlan, last changed 2022-04-11 14:57 by admin.

Messages (6)
msg203771 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2013-11-22 14:39
From issue #19553:

8. "make install" is a superset of "make altinstall" and one would expect the results of (a) "make install" to be the same as (b) "make altinstall && make install".  However (b) results in "python -m ensurepip --altinstall --upgrade && python -m ensurepip --upgrade" which results in no unversioned pip files being installed as the second call to pip does nothing:

Requirement already up-to-date: setuptools in /py/dev/3x/root/uxd/lib/python3.4/site-packages
Requirement already up-to-date: pip in /py/dev/3x/root/uxd/lib/python3.4/site-packages

We may need some magic on the pip side when ENSUREPIP_OPTIONS is set to make this behave consistently.
msg205790 - (view) Author: Donald Stufft (dstufft) * (Python committer) Date: 2013-12-10 11:27
Making this happen is a non trivial change to pip. Is this *required* for PEP453?

The problem is the pip dependency is already being seen as fulfilled so it's not reinstalling pip again with the new options picked. Likely the actual answer is a command in pip to regenerate the scripts but that will require some engineering.
msg205794 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2013-12-10 11:47
Fixing in pip 1.6/CPython 3.4.1 would be fine by me - that's why I only created it as "high" rather than "release blocker"
msg226555 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-09-08 02:38
Ping.  Also this will be presumably be an issue for the approved 2.7.x backport of ensurepip.
msg226565 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-09-08 09:44
No change for 3.x (unless something changed on the pip side that I'm not
aware of).

For 2.7, the Makefile changes, at least for the install and altinstall
targets, were deliberately excluded from the backport PEP.
msg231444 - (view) Author: Donald Stufft (dstufft) * (Python committer) Date: 2014-11-20 17:36
So here's a thought:

pip does have a CLI flag --force-reinstall which will uninstall and then reinstall whatever is being installed. If we modified things so that ensurepip supported this flag (or always used it with --upgrade) then it would fix this issue. The downside here is that only works with --upgrade.
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63892
2014-11-20 17:36:02dstufftsetmessages: + msg231444
2014-09-08 09:44:18ncoghlansetmessages: + msg226565
2014-09-08 02:38:40ned.deilysetmessages: + msg226555
versions: + Python 2.7, Python 3.5
2013-12-10 11:47:38ncoghlansetmessages: + msg205794
2013-12-10 11:27:58dstufftsetmessages: + msg205790
2013-11-22 14:39:14ncoghlancreate