Backporting ensurepip to 2.7, Which commands to install?
I'm working on the backport of ensurepip to Python 2.7, and I realized that I'm not sure which commands to install. Right now by default pip (outside of the context of ensurepip) will install pip, pip2, and pip2.7 if installed in Python 2.7. In Python 3's ensurepip we modified it so that it would install pip3, and pip3.4, but *not* pip if it was an "install", and only pip3.4 if it was an "alt install". My question is, does this behavior make sense for ensurepip in 2.7? Or should it also install the "pip" command if it is an "install"? --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
That is copying the (alt)install targets of Python's own Makefile, and I think those are exactly right. On Oct 3, 2014 3:07 PM, "Donald Stufft" <donald@stufft.io> wrote:
I'm working on the backport of ensurepip to Python 2.7, and I realized that I'm not sure which commands to install. Right now by default pip (outside of the context of ensurepip) will install pip, pip2, and pip2.7 if installed in Python 2.7. In Python 3's ensurepip we modified it so that it would install pip3, and pip3.4, but *not* pip if it was an "install", and only pip3.4 if it was an "alt install".
My question is, does this behavior make sense for ensurepip in 2.7? Or should it also install the "pip" command if it is an "install"?
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org
Ok, so neither Python 2.7 nor Python 3.x’s ensure pip command will install a ``pip`` binary by default without a flag. That's fine with me, just wanted to make sure it made sense for Python 2.x. Thanks!
On Oct 3, 2014, at 8:31 PM, Guido van Rossum <guido@python.org> wrote:
That is copying the (alt)install targets of Python's own Makefile, and I think those are exactly right.
On Oct 3, 2014 3:07 PM, "Donald Stufft" <donald@stufft.io <mailto:donald@stufft.io>> wrote: I'm working on the backport of ensurepip to Python 2.7, and I realized that I'm not sure which commands to install. Right now by default pip (outside of the context of ensurepip) will install pip, pip2, and pip2.7 if installed in Python 2.7. In Python 3's ensurepip we modified it so that it would install pip3, and pip3.4, but *not* pip if it was an "install", and only pip3.4 if it was an "alt install".
My question is, does this behavior make sense for ensurepip in 2.7? Or should it also install the "pip" command if it is an "install"?
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
_______________________________________________ Python-Dev mailing list Python-Dev@python.org <mailto:Python-Dev@python.org> https://mail.python.org/mailman/listinfo/python-dev <https://mail.python.org/mailman/listinfo/python-dev> Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org <https://mail.python.org/mailman/options/python-dev/guido%40python.org>
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
That's not what I meant. Python 2.7 does install "python" unless you use altinstall. On Oct 3, 2014 5:33 PM, "Donald Stufft" <donald@stufft.io> wrote:
Ok, so neither Python 2.7 nor Python 3.x’s ensure pip command will install a ``pip`` binary by default without a flag. That's fine with me, just wanted to make sure it made sense for Python 2.x. Thanks!
On Oct 3, 2014, at 8:31 PM, Guido van Rossum <guido@python.org> wrote:
That is copying the (alt)install targets of Python's own Makefile, and I think those are exactly right. On Oct 3, 2014 3:07 PM, "Donald Stufft" <donald@stufft.io> wrote:
I'm working on the backport of ensurepip to Python 2.7, and I realized that I'm not sure which commands to install. Right now by default pip (outside of the context of ensurepip) will install pip, pip2, and pip2.7 if installed in Python 2.7. In Python 3's ensurepip we modified it so that it would install pip3, and pip3.4, but *not* pip if it was an "install", and only pip3.4 if it was an "alt install".
My question is, does this behavior make sense for ensurepip in 2.7? Or should it also install the "pip" command if it is an "install"?
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
Whoops, I misred. So to be clear, you think: install -> pip, pip2, pip2.7 altinstall -> pip2.7
On Oct 3, 2014, at 8:46 PM, Guido van Rossum <guido@python.org> wrote:
That's not what I meant. Python 2.7 does install "python" unless you use altinstall.
On Oct 3, 2014 5:33 PM, "Donald Stufft" <donald@stufft.io <mailto:donald@stufft.io>> wrote: Ok, so neither Python 2.7 nor Python 3.x’s ensure pip command will install a ``pip`` binary by default without a flag. That's fine with me, just wanted to make sure it made sense for Python 2.x. Thanks!
On Oct 3, 2014, at 8:31 PM, Guido van Rossum <guido@python.org <mailto:guido@python.org>> wrote:
That is copying the (alt)install targets of Python's own Makefile, and I think those are exactly right.
On Oct 3, 2014 3:07 PM, "Donald Stufft" <donald@stufft.io <mailto:donald@stufft.io>> wrote: I'm working on the backport of ensurepip to Python 2.7, and I realized that I'm not sure which commands to install. Right now by default pip (outside of the context of ensurepip) will install pip, pip2, and pip2.7 if installed in Python 2.7. In Python 3's ensurepip we modified it so that it would install pip3, and pip3.4, but *not* pip if it was an "install", and only pip3.4 if it was an "alt install".
My question is, does this behavior make sense for ensurepip in 2.7? Or should it also install the "pip" command if it is an "install"?
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
_______________________________________________ Python-Dev mailing list Python-Dev@python.org <mailto:Python-Dev@python.org> https://mail.python.org/mailman/listinfo/python-dev <https://mail.python.org/mailman/listinfo/python-dev> Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org <https://mail.python.org/mailman/options/python-dev/guido%40python.org>
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
Yes. On Friday, October 3, 2014, Donald Stufft <donald@stufft.io> wrote:
Whoops, I misred.
So to be clear, you think:
install -> pip, pip2, pip2.7 altinstall -> pip2.7
On Oct 3, 2014, at 8:46 PM, Guido van Rossum <guido@python.org <javascript:_e(%7B%7D,'cvml','guido@python.org');>> wrote:
That's not what I meant. Python 2.7 does install "python" unless you use altinstall. On Oct 3, 2014 5:33 PM, "Donald Stufft" <donald@stufft.io <javascript:_e(%7B%7D,'cvml','donald@stufft.io');>> wrote:
Ok, so neither Python 2.7 nor Python 3.x’s ensure pip command will install a ``pip`` binary by default without a flag. That's fine with me, just wanted to make sure it made sense for Python 2.x. Thanks!
On Oct 3, 2014, at 8:31 PM, Guido van Rossum <guido@python.org <javascript:_e(%7B%7D,'cvml','guido@python.org');>> wrote:
That is copying the (alt)install targets of Python's own Makefile, and I think those are exactly right. On Oct 3, 2014 3:07 PM, "Donald Stufft" <donald@stufft.io <javascript:_e(%7B%7D,'cvml','donald@stufft.io');>> wrote:
I'm working on the backport of ensurepip to Python 2.7, and I realized that I'm not sure which commands to install. Right now by default pip (outside of the context of ensurepip) will install pip, pip2, and pip2.7 if installed in Python 2.7. In Python 3's ensurepip we modified it so that it would install pip3, and pip3.4, but *not* pip if it was an "install", and only pip3.4 if it was an "alt install".
My question is, does this behavior make sense for ensurepip in 2.7? Or should it also install the "pip" command if it is an "install"?
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
_______________________________________________ Python-Dev mailing list Python-Dev@python.org <javascript:_e(%7B%7D,'cvml','Python-Dev@python.org');> https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%40python.org
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
--- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
-- --Guido van Rossum (on iPad)
On 4 October 2014 10:51, Donald Stufft <donald@stufft.io> wrote:
Whoops, I misred.
So to be clear, you think:
install -> pip, pip2, pip2.7 altinstall -> pip2.7
To spell out the assumption I didn't make clear when helping with the backport PEP, the difference comes from PEP 394, which specifies the following behaviour when installing Python itself: Python 2.7: python, python2, python2.7 Python 3.4: python3, python3.4 That maps to ensurepip as: Python 2.7: pip, pip2, pip2.7 Python 3.4: pip3, pip3.4 Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (3)
-
Donald Stufft
-
Guido van Rossum
-
Nick Coghlan