[Distutils] PEP439 and upgrading pip

Nick Coghlan ncoghlan at gmail.com
Sat Jun 15 02:50:41 CEST 2013


On 15 June 2013 09:58, Marcus Smith <qwcode at gmail.com> wrote:
>
>> I've come to doubt the wisdom of omitting the metadata or using a
>> default install location that differs from pip's default location.
>> Once we download the pip wheel file, we should be able to unpack it to
>> a secure temporary directory and use it to install itself. That means
>> we should be able to do a full install of pip by default, rather than
>> anything that hides the metadata. Updating it later then becomes the
>> same as updating any other pip installed distribution.
>
>
> ok, sounds good.
>
> once the pip bootstrap is done, you'll just have a standard install of pip.
> and after that, it's pip's job to support upgrading itself properly for
> users.

Yep. There are a couple of wrinkles from a user experience/sanity
perspective point of view though.

1. We should write the bootstrapped pip to the same location that
we're installing the package to (so system global, user local or
current venv).
2. We should check we can actually write to that location before
downloading the pip wheel. If we can't write to that destination, we
should emit the same error message pip itself would in that situation.
3. If we can write to it, we download the wheel, add it directly to
the front of sys.path (as Paul suggested), import pip.main from there
and then use that to install pip itself before continuing with the
rest of the installation (still using the copy from the wheel for that
initial invocation).

Cheers,
Nick.

--
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Distutils-SIG mailing list