[Distutils] Comments on PEP 426

Daniel Holth dholth at gmail.com
Thu Aug 29 19:11:48 CEST 2013


It probably makes sense for some version of bdist_wheel to be merged
into setuptools eventually. In that system pip would document which
setup.py commands and arguments it uses and a non-distutils-derived
setup.py would have to implement a minimal set of commands to
interoperate. This is basically where we are today minus the "minimal"
and "documented" details.

The alternative, not mutually exclusive solution would be to define a
Python-level detect/build plugin system for pip  which would call a
few methods to generate an installable from a source distribution.

It doesn't exist yet mostly because the pip developers haven't written
enough alternative build systems. There is no strategic reason for the
delay.

On Thu, Aug 29, 2013 at 11:49 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> On 29 August 2013 16:02, Oscar Benjamin <oscar.j.benjamin at gmail.com> wrote:
>>On 29 August 2013 15:30, Antoine Pitrou <antoine at python.org> wrote:
> [...]
>>> (after all, it's just "python setup.py build_bdist", or something :-))
>>
>> The point is that pip and other packaging tools will use 'python
>> setup.py ...' to do all the building and wheel making and so on.
>> However the required interface that setup.py should expose is not
>> documented anywhere and is essentially implementation defined where
>> the implementation is the setup() function from a recent version of
>> setuptools. In the interest of standardising the required parts of
>> existing practice the required subset of this interface should be
>> documented.
>
> Specifically, the command is
>
>     python setup.py bdist_wheel
>
> But that requires the wheel project and setuptools to be installed,
> and we're not going to require all users to have those available.
>
> Also, other projects can build wheels with different commands/interfaces:
> * distlib says put all your built files in a set of directories then
> do wheel.build(paths=path_mapping) - no setup.py needed at all
> * pip says pip wheel requirement (but that uses setuptools/wheel under the hood)
> * bento might do something completely different
>
> The whole question of standardising the command line API for building
> (sdists and) wheels is being avoided at the moment, as it's going to
> be another long debate (setup.py is too closely associated with
> distutils and/or setuptools for some people).
>
> AIUI, we're sort of moving towards the "official" command line API
> being pip's (so "pip wheel XXX") but that's not a complete answer as
> currently pip internally just uses the setup.py command line, and the
> intention is to decouple the two so that alternative build tools (like
> bento, I guess) get a look in. It's all a bit vague at the moment,
> though, because nobody has even looked at what alternative build tools
> might even be needed.
>
> I could have this completely wrong, though - we're trying very hard to
> keep the work in small chunks, and building is not one of those chunks
> yet.
>
> Paul.
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig


More information about the Distutils-SIG mailing list