Closed thejcannon closed 4 months ago
The line you're highlighting there is part of the fallback pathway for prepare_metadata_for_build_editable
. The idea is that if the backend doesn't provide that hook, we fall back to creating the (edtitable) wheel, then extract the metadata from it, saving the wheel alongside it, where a future call to build_editable
can use it. In this scenario, the parameters make sense - metadata_directory
is the location this hook has been given to save output.
You can see the 'proper' invocation of the build_editable
hook here:
Oh, so you're explicitly passing the metadata directory as the wheel directory as sort of a shortcut. You could use a tempdir, but then you'd be building the wheel twice as per this code?
Ok I see it now. Maybe next time you're in the neighborhood drop a comment, so the next guy isn't as puzzled as I was (and ultimately looks like the bug was my hook wasn't giving defaults for the latter two parameters which is what led me here).
Hope you have a nice weekend and life is treating you well. Thanks for responding!
https://github.com/pypa/pyproject-hooks/blob/261e4d82121782d05f6fddfaded8b8a7493d0370/src/pyproject_hooks/_in_process/_in_process.py#L195
According to PEP 660, this ought to be:
(proof from
setuptools
: https://github.com/pypa/setuptools/blob/720862807dea012f3a0e7061880691025f736f11/setuptools/build_meta.py#L435)