[Distutils] Comments on PEP 426
oscar.j.benjamin at gmail.com
Thu Aug 29 17:02:07 CEST 2013
On 29 August 2013 15:30, Antoine Pitrou <antoine at python.org> wrote:
> Nick Coghlan <ncoghlan <at> gmail.com> writes:
>> >> This version of the metadata specification continues to use ``setup.py``
>> >> and the distutils command syntax to invoke build and test related
>> >> operations on a source archive or VCS checkout.
>> > I don't really understand how Metadata 2.0 is dependent on the distutils
>> > command scheme. Can you elaborate?
>> Given an sdist, how do you build a wheel?
>> Given a source checkout or raw tarball, how do you build an sdist or
>> generate the distribution's metadata?
>> The whole problem of building from source is currently woefully
>> underspecified, and there's a lot to be said in favour of
>> standardising a subset of the existing setuptools command line API
> Hmmm... I'm not sure I follow the reasoning. The internal mechanics
> of building a binary archive may deserve standardizing, and perhaps
> a dedicated distlib API for it, but why would that impact the
> command-line API?
> (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
Projects like numpy/scipy that deliberately don't use the setup()
function from either setuptools or distutils need to know what
interface is expected of their setup.py. The same goes for any attempt
to build a new third-party package that would be used as a replacement
for building with distutils/setuptools (which are woefully inadequate
for projects with significant C/Fortran etc. code): any new build
system needs to have an API that it should conform to. On the other
side the packaging tools like pip etc. need to know what interface
they can *require* of setup.py without breaking compatibility with
non-distutils/setuptools build systems.
More information about the Distutils-SIG