On 10 July 2017 at 17:13, Thomas Kluyver <thomas@kluyver.me.uk> wrote:
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.
Agreed, I think the two kinds of artifact generation we want to support directly in PEP 517 are: - artifacts checked in to source control (ala autotools and CPython's Argument Clinic) - artifacts created while building the wheel file While we can't *prevent* backends doing artifact generation in build_sdist, we don't really want to encourage it either - as you say, we'd prefer that folks migrate such processes to the sdist->wheel step.
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.
Yep, and frontends may even decide to do something like delegating out-of-tree build support to backends by default, while offering an option to force the use of an intermediate sdist, similar to the way that tox uses an sdist by default, but provides a setting in tox.ini to turn that off. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia