Add get_output_mapping
to build_py
and build_ext
#3392
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another set of changes targeting PEP 660.
The existing PoC implementation of PEP 660 "persuades" build_py and build_ext to symlink/hardlink files instead of copying, but the problem with this approach is that we don't have any visibility of what is happening.
In this PR I am proposing to expose
get_output_mapping
(together with the existingget_outputs
). This will probably be the basis of the "protocol"editable_wheel
will use for handlingbuild
subcommands.get_output_mapping
should a mapping between destination files as they would be produced by the build (dict keys) into the respective existing (source) files (dict values).Existing (source) files should be represented as strings relative to the project root directory.
Destination files should be strings in the form of
"{build_lib}/destination/file/path"
.Pull Request Checklist
changelog.d/
.(See documentation for details)