On 28 June 2017 at 13:43, Nathaniel Smith <njs@pobox.com> wrote:
On Tue, Jun 27, 2017 at 4:20 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
On 27 June 2017 at 18:54, Nathaniel Smith <njs@pobox.com> wrote:
On Tue, Jun 27, 2017 at 12:27 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
2. If you don't find the input preparation hook:
- call `get_build_sdist_requires()` - call `get_build_wheel_requires()` - install both sets of additional dependencies - call `build_sdist()` - unpack the sdist into the build directory - call `build_wheel()`
Side note: I think this is wrong -- I think you can't call get_build_wheel_requires until after you've unpacked the sdist, because that's a whole new tree that might be arbitrarily different. (In practice I guess this should never happen, but we should be clear conceptually I think.)
No, both `get_build_wheel_requires()` and `build_wheel()` also have to work in-place - backends aren't allowed to assume that *all* builds will be out-of-tree, even though pip specifically is expected to work that way. Neither of these hooks is allowed to give different results depending on whether you're doing an in-place or out-of-tree build.
Right. But if you're building and sdist and unpacking it and then calling build_wheel there, then that's not an out-of-tree build, it's an in-tree build in a new tree. The wheel hooks are certainly allowed to give different results in a VCS-tree and an unpacked-sdist-tree, they have different pyproject.toml files!
Umm, no. The pyproject.toml file MUST NOT change when building the sdist. It's a human-managed input file - if any step of the build process mutates it, that step is *broken*. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia