[Distutils] A possible refactor/streamlining of PEP 517

Thomas Kluyver thomas at kluyver.me.uk
Mon Jul 10 03:13:06 EDT 2017


On Mon, Jul 10, 2017, at 07:01 AM, Nick Coghlan wrote:
> So I think we have pretty solid evidence that the reason the
> procedural "build directory preparation" hook wasn't sitting well with
> people was because that isn't the way build systems typically model
> the concept, while a "build directory" setting is very common (even if
> that "setting" is "the current working directory when configuring or
> running the build").

Hooray! :-)

Do we want to also provide a build_directory for the build_sdist hook?
In principle, I don't think making an sdist should involve a build step,
but I know that some projects do perform steps like cython code gen or
JS minification before making the sdist. I think this was a workaround
to ease installation before wheel support was widespread, and I'd be
inclined to discourage it now, so my preference would be no
build_directory parameter for build_sdist. Backends which insist on
generating intermediates at that point can make a temp dir themselves.

Then I guess that the choice between building a wheel directly and
attempting to build an sdist first (with direct fallback) is one for
frontends, and doesn't need to be specified.

Thomas


More information about the Distutils-SIG mailing list