On May 31, 2017, at 3:45 PM, Thomas Kluyver <thomas@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