On 28 June 2017 at 05:29, Nick Coghlan <ncogh...@gmail.com> wrote: > On 28 June 2017 at 13:43, Nathaniel Smith <n...@pobox.com> wrote: >> I would say that there's only one required path, which is in-place. >> (But the tree that they do the in-place build in might have a more or >> less complicated history). It worries me that you seem to think that >> build_sdist and build_wheel should be coupled like this... this >> proliferation of cases and the reification of "out of tree builds" as >> a special thing that's different from an in-tree build in a temporary >> tree is already what worried me about prepare_wheel_input_files, and >> now it seems to be spreading :-). > > I don't know what additional coupling you're seeing: the only coupling > is that building a wheel directly from a VCS source tree and first > exporting an sdist and then building a wheel from that *must give the > same result* (modulo any problems related to reproducible builds, or > the lack thereof). If a project can't meet that expectation, then > their sdist generation is broken, since it clearly isn't exporting the > necessary content to actually build the project properly. > > If you weren't aware of that inherent coupling, and are surprised by > the fact that it's a constraint on publishing useful sdists, then I'd > consider it a good thing that PEP 517 is now making it more explicit.
Note that the whole concept of "out of tree builds" is not something theoretical - it comes directly from pip's requirement to be able to do clean builds. So saying that tree->sdist->unpacked sdist is "just another in-place build of a different tree" is missing the point, which is that we need a mechanism to produce an effectively identical, in the sense that it must result in the same wheel, copy of a tree - and because we chose the sdist as the route for that, there are constraints on the contents of a sdist. I view those constraints as pretty much self evident, as I would be extremely surprised if I had a source tree of *any* form for a project, and I build a sdist from it and gave it to a friend, and when we both built wheels and installed them, we had different installed copies of the project. The alternative would be to have a separate "produce a copy of this tree that builds the same wheel" hook. And I thought we already went round that loop, which is how we ended up deciding that the sdist was our approach... Paul _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig