On 25 June 2017 at 17:26, Nathaniel Smith <n...@pobox.com> wrote: > On Sat, Jun 24, 2017 at 7:57 AM, Thomas Kluyver <tho...@kluyver.me.uk> wrote: >> Nick has merged that PR, and the updated PEP is visible here: >> >> https://www.python.org/dev/peps/pep-0517/ >> >> Hopefully we're nearing a consensus on this now. If you're interested, >> please do have a read through the latest version. >> > > Reading through it just now, there were some bits that gave me the > impression that prepare_build_wheel_files must *always* be called > before calling build_wheel (e.g. "Because the wheel will be built from > a temporary build directory, build_wheel may create intermediate files > in the working directory, and does not need to take care to clean > them up."). If we end up keeping prepare_build_wheel_files, then I > think we should add some text making clear exactly which paths are > legal.
Doing out-of-tree builds is completely optional for frontends, so the possible build paths are: In-place build: * just call build_wheel on the source tree Out-of-tree build (via sdist): * call build_sdist * unpack it into the build directory * call build_wheel on the build directory Out-of-tree build (prepare hook defined): * call prepare_wheel_build_files * call build_wheel on the prepared build directory The critical constraint on front-ends is that they need to ensure the appropriate dependencies are present before calling the affected hooks - beyond that, they're entirely free to do things however they like (e.g. always build in-place, always go via the sdist hook, or some combination there-of). Aside from not producing an archive, the bit that makes `prepare_wheel_build_files` notably different from `build_sdist` is that it relies on `get_build_wheel_requires` *not* on `get_build_sdist_requires`: https://www.python.org/dev/peps/pep-0517/#build-environment Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig