[Distutils] setup_requires for dev environments

Nick Coghlan ncoghlan at gmail.com
Tue Mar 17 00:03:59 CET 2015


On 17 Mar 2015 02:33, "Daniel Holth" <dholth at gmail.com> wrote:
>
> Problem: Users would like to be able to import stuff in setup.py. This
> could be anything from a version fetcher to a replacement for
> distutils itself. However, if setup.py is the only place to specify
> these requirements there's a bit of a chicken and egg problem, unless
> they have unusually good setuptools knowledge, especially if you want
> to replace the  entire setup() implementation.
>
> Problem: Having easy_install do it is not what people want and misses
> some important use cases.
>
> Problem: Based on empirical evidence PEP 426 will never be done. Its
> current purpose is to shut down discussion of pragmatic solutions.

Slight correction here: one of my current aims with PEP 426 is deliberately
discouraging the discussion of solutions that only work reliably if
everyone switches to a new build system first. That's a) never going to
happen; and b) one of the key mistakes the distutils2 folks made that
significantly hindered adoption of their work, and I don't want us to
repeat it.

My other key aim is to provide a public definition of what I think "good"
looks like when it comes to software distribution, so I can more easily
assess whether less radical proposals are still moving us closer to that
goal.

Making pip (and perhaps easy_install) setup.cfg aware, such that it assumes
the use of d2to1 (or a semantically equivalent tool) if setup.cfg is
present and hence is able to skip invoking setup.py in relevant cases,
sounds like just such a positive incremental step to me, as it increases
the number of situations where pip can avoid executing a Turing complete
"configuration" file, without impeding the eventual adoption of a more
comprehensive solution.

I don't think that needs a PEP - just an RFE against pip to make it d2to1
aware for each use case where it's relevant, like installing setup.py
dependencies. (And perhaps a similar RFE against setuptools)

Projects that choose to rely on that new feature will be setting a high
minimum installer version for their users, but some projects will be OK
with that (especially projects private to a single organisation after
upgrading pip on their production systems).

Cheers,
Nick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150317/2687fc37/attachment.html>


More information about the Distutils-SIG mailing list