On Jul 11, 2013, at 6:00 PM, Carl Meyer <[email protected]> wrote:

> On 07/11/2013 03:48 PM, Nick Coghlan wrote:
>> I was thinking about that, and I'm wondering if the most sensible option
>> may be to claim the "getpip" name on PyPI for ourselves and then do the
>> following:
>> 
>> 1. Provide "getpip" in the standard library for 3.4+ (and perhaps in a
>> 2.7.x release)
>> 2. Install it to site-packages in the "Python launcher for Windows"
>> installer for earlier versions
>> 
>> getpip would expose at least one function:
>> 
>>    def bootstrap(index_url=None, system_install=False):
>>        ...
>> 
>> And executing it as a main module would either:
>> 
>> 1. Do nothing, if "import pip" already works
>> 2. Call bootstrap with the appropriate arguments
>> 
>> That way, installation instructions can simply say to unconditionally do:
>> 
>>    python -m getpip
>> 
>> And that will either:
>> 
>> 1. Report that pip is already installed;
>> 2. Bootstrap pip into the user environment; or
>> 3. Emit a distro-specific message if the distro packagers want to push
>> users to use the system pip instead (since they get to patch the system
>> Python and can tweak the system getpip however they want)
>> 
>> The 2.7 change would then be to create a new download that bundles the
>> Windows launcher into the Windows installer.
>> 
>> Users aren't stupid - the problem with the status quo is really that the
>> bootstrapping instructions are annoyingly complicated and genuinely
>> confusing, not that an explicit bootstrapping step is needed in the
>> first place.
> 
> +1. This sounds far better to me than the implicit bootstrapping.
> 
> Carl
> _______________________________________________
> Distutils-SIG maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/distutils-sig

Generally +1, the one negative point I see is it's kinda a degradation in 
functionality to need to type ``python -m getpip`` in every PyEnv (coming from 
virtualenv). Maybe PyEnv can be smart enough to automatically install pip 
that's installed in the interpreter it's installed from? Maybe that's too much 
magic and the answer will be that tools like virtualenvwrapper will continue to 
exist and wrap that for you.

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to