[Distutils] PEP439 and backward compat / easy_install / distlib

Nick Coghlan ncoghlan at gmail.com
Mon Mar 25 17:50:45 CET 2013


On Mon, Mar 25, 2013 at 9:42 AM, Marcus Smith <qwcode at gmail.com> wrote:
>
>>
>> The *only* case this approach doesn't immediately cover is a project that:
>> 1. Doesn't publish a pre-built wheel for the current platform (or egg,
>> assuming pip gains support for those, perhaps by implicitly converting
>> them to wheels)
>> 2. Doesn't publish 2.0 metadata with "Setup-Requires-Dist: setuptools"
>> 3. imports setuptools in its setup.py file
>>
>
> so that's most everything on pypi right now in the short and medium term.
>
>>
>> This can be handled in pip, by using the AST module to scan for
>> setuptools imports in setup.py (or else by checking for a setuptools
>> related ImportError after trying to run it).
>
>
> so you're asking pip to get this working soon, right?  like before
> python3.4, so this PEP can go in?

Our messages crossed in flight - I realised I'm fine with assuming a
setuptools dependency for eggs and all sdist's without 2.0+ metadata,
it's only the idea of installing setuptools as a dependency of
bootstrapping pip itself that I'm not happy with. That means pip only
needs to support two configurations:

1. No setuptools, can only install from wheel files and sdists with
2.0+ metadata
2. Has setuptools, can also install from sdists with legacy metadata and eggs

By default, installing setuptools when necessary should be automatic,
but advanced users should be able to ask that it instead be treated as
an error if no wheel is available to satisfy an installation request
or dependency (so they don't inadvertently install setuptools on their
production systems if they don't want to).

To make this work, we'll need to get wheels published on PyPI for
setuptools before 3.4, as well as ensuring pip doesn't require
setuptools to install from wheel files.

Cheers,
Nick.


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


More information about the Distutils-SIG mailing list