[Python-Dev] updating ensurepip to include wheel

Donald Stufft donald at stufft.io
Fri Aug 7 09:20:04 CEST 2015

> On Aug 7, 2015, at 3:02 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 7 August 2015 at 08:50, Robert Collins <robertc at robertcollins.net> wrote:
>> Certainly the framing of ensurepip as 'this installs pip' is going to
>> be confusing and misleading if it doesn't install pip the way
>> get-pip.py (or virtualenv) install pip, leading to confusion such as
>> that.
>> Given the inconsequential impact of installing wheel, I see only harm
>> in holding it back, and only benefits in adding it. All the harm from
>> having source builds comes in with setuptools ;).
> Right, this is the main reason I'm actually *in favour* of adding
> wheel to the ensurepip bundle upstream - it significantly improves the
> "out of the box" experience of pyvenv by implicitly caching builds.
> (I'm also in favour because it will lead to redistributors providing
> "pip wheel" support by default, and having to make an explicit design
> decision *not* to provide it if we want to do something different).
> The only reason I'm asking for a PEP is because I'm confident we're
> going to want a "support prebuilt wheels only" installation option
> downstream in the Linux distro world - shipping setuptools by default
> is a pragmatic concession to practical reality rather than something
> we *want* to be doing.
> As such, I do think Robert raises a good point that any new ensurepip
> option should probably prevent installation of both wheel *and*
> setuptools, since pip can install from wheel files without setuptools
> these days. The CLI option name might be something like
> "--no-build-tools", and could also be added to the public pyvenv and
> virtualenv interfaces.
> Downstream in Fedora, now that we have weak dependency support, I'd
> advocate for switching the python->setuptools dependency over to
> Recommends, and adding wheel as a Recommends dependency from the
> start.
> Cheers,
> Nick.
> -- 
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

I’m not sure if —no-build-tools make sense, since I plan on removing setuptools from ensurepip completely once pip can implicitly install it. PEP 453 explicitly called out the fact that setuptools was installed as an implementation detail with an eye to remove it in the future. Adding flags that deal with it specifically doesn’t seem like the right path to go down.

More information about the Python-Dev mailing list