[Distutils] Provisionally accepting PEP 517's declarative build system interface

Donald Stufft donald at stufft.io
Wed May 31 16:16:07 EDT 2017


> On May 31, 2017, at 3:45 PM, Thomas Kluyver <thomas at kluyver.me.uk> wrote:
> 
> On Wed, May 31, 2017, at 08:20 PM, Donald Stufft wrote:
>> I am struggling to figure out where there is opposition to simply exposing something in a standard way, that you were already planning on implementing anyways.
> 
> I have issues with it because:
> 1. Building a *release-quality* sdist is a complicated topic in its own right, and I'd like to move forwards with what we've already defined for building wheels without getting mired in that debate.

How you build the release-quality sdist isn’t really of concern of PEP 517 any more than building a release quality wheel is, it’s up to the build tool to implement that as it makes sense for them.

> 2. I think it's a mistake to conflate "get the files we need to build this project" with "make a source distribution", and I don't want one hook to be used for both operations. Flit can do the former very easily, and in situations where it cannot do the latter.
>   a) If pip uses the hook for the former purpose, and I implement it with that in mind, it will give poor results if other tools use it to release an sdist.
>   b) If the hook properly makes an sdist, it will fail in situations where it can do what pip needs, and it will be unnecessarily slow even where it succeeds.

I could see this as an argument that the PEP should have *both* a build_sdist and a prepare_build_files hook, if you don’t think that the build_sdist hook is suitable on it’s own. I’m not sure how I feel about that off the top of my head, but I *think* I would be okay adding the mandatory build_sdist command and an optional prepare_build_files hook, with the semantics being that if prepare_build_files is NOT defined, then it is acceptable for a tool like pip to use build_sdist for this purpose and if prepare_build_files IS defined, then the resulting wheel from build_wheel should not meaningfully differ from what would have been produced from build_sdist + build_wheel.

—
Donald Stufft



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170531/f67da721/attachment-0001.html>


More information about the Distutils-SIG mailing list