[Python-Dev] updating ensurepip to include wheel

Nick Coghlan ncoghlan at gmail.com
Wed Aug 5 16:01:47 CEST 2015

On 3 August 2015 at 11:06, Donald Stufft <donald at stufft.io> wrote:
> On August 2, 2015 at 8:47:46 PM, Robert Collins (robertc at robertcollins.net) wrote:
>> So, pip 7.0 depends on the wheel module for its automatic wheel
>> building, and installing pip from get-pip.py, or the bundled copy in
>> virtualenvs will automatically install wheel.
>> But ensurepip doesn't bundle wheel, so we're actually installing a
>> slightly crippled pip 7.1, which will lead to folk having a poorer
>> experience.
>> Is this a simple bug, or do we need to update the PEP?
> Personally, I think it's not going to be worth the pain to add wheel to
> ensurepip. We (pip) already have a somewhat rocky relationship with some
> downstream vendors because of the bundling of pip and setuptools that I'm not
> sure that wheel makes sense. Especially given that I want the optional
> dependency on Wheel to be a temporary measure until we can just implicitly
> install wheel as a build time dependency within pip and no longer need to
> install it implicitly in get-pip.py or virtualenv. In the future I expect
> setuptools to be removed as well at a similar time when we can implicitly
> install setuptools as a build time dependency of an sdist and do not require
> end users to install it explicitly.
> That being said, I think the PEP would need to be updated (and possibly a new
> PEP?) since we explicitly called out the fact that setuptools would currently
> be included until pip no longer needed it to be installed seperately.

I'm going to contradict what I said to Robert at the PyCon AU sprints
earlier this week, and agree with Donald here.

setuptools is in the situation where because it also includes
pkg_resources, it blurs the line between "build time" and "run time"
dependency. While it would be nice to split that and have a "just
pkg_resources" runtime dependency distinct from the build time
dependency, that isn't likely to happen any time soon.

wheel, by contrast, is already a pure build time dependency for
bdist_wheel, and thus should be getting brought in as an implied
"build requires" by pip itself when building from source. This does
pose an interesting challenge from the perspective of the "offline
installation" use case for ensurepip, where wheels are used as a local
build caching mechanism, but we don't assume PyPI access, but it isn't
one we really considered in the original ensurepip PEP.

So actually doing this would probably require a PEP to update
ensurepip with some additional options related to whether the build
dependencies should be installed or not, and give downstream vendors a
free pass to exclude the build dependencies from the default
installation set.


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

More information about the Python-Dev mailing list