[Distutils] PEP 439 and pip bootstrap updated

Carl Meyer carl at oddbird.net
Fri Jul 12 00:00:01 CEST 2013


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


More information about the Distutils-SIG mailing list