Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_output_mapping to build_py and build_ext #3392

Merged
merged 6 commits into from Jun 21, 2022

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Jun 19, 2022

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 existing get_outputs). This will probably be the basis of the "protocol" editable_wheel will use for handling build 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

@abravalheri abravalheri marked this pull request as ready for review June 20, 2022 08:21
@abravalheri abravalheri merged commit cdd12f3 into pypa:feature/pep660 Jun 21, 2022
@abravalheri abravalheri deleted the enable-get_outputs branch June 21, 2022 09:06
ambv added a commit to hpyproject/hpy that referenced this pull request Sep 21, 2022
This is needed due to setuptools 64.0.0 implementing PEP 660 and
circumventing usage of `write_stub_file` in `copy_extensions_to_source`
(see: pypa/setuptools#3392)

In turn, we require setuptools 64.0.0 or higher.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant