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

PEP 660 support #400

Merged
merged 2 commits into from
Sep 29, 2021
Merged

PEP 660 support #400

merged 2 commits into from
Sep 29, 2021

Conversation

sbidoul
Copy link
Member

@sbidoul sbidoul commented Mar 20, 2021

This is a very rough proof of concept for build_wheel_for_editable, as described in https://discuss.python.org/t/standardising-editable-mode-installs-runtime-layout-not-hooks/4098/55 and prototyped in pypa/pip#8212.

It works by adding a .pth file in the transient wheel, and should therefore behave identically as flit install --pth-file.

sbidoul referenced this pull request in sbidoul/peps Apr 2, 2021
- split abstract and motivation
- add terminology and goals
- recommend +editable local version identifier
- add .pth as an option in what to put in the wheel
- add frontend requirements
@sbidoul sbidoul force-pushed the pep517-editable-sbi branch from 56a03ac to c6d3ed9 Compare July 10, 2021 12:00
@sbidoul sbidoul changed the title [WIP][POC] build_wheel_for_editable support PEP 660 support Jul 10, 2021
@sbidoul
Copy link
Member Author

sbidoul commented Jul 10, 2021

Updated to match the latest PEP 660 version.

@takluyver
Copy link
Member

Thanks @sbidoul - this looks reasonable enough to me, if you'd like to add a test or two.

@takluyver takluyver added this to the 3.4 milestone Jul 31, 2021
@sbidoul
Copy link
Member Author

sbidoul commented Aug 1, 2021

Thanks for the review. I should come back to this later this month.

@sbidoul sbidoul force-pushed the pep517-editable-sbi branch from c6d3ed9 to 2a87858 Compare August 29, 2021 10:48
@sbidoul sbidoul marked this pull request as ready for review August 29, 2021 10:52
@sbidoul
Copy link
Member Author

sbidoul commented Aug 29, 2021

@takluyver this should now be ready.

I'm not sure how to test buildapi.build_editable as existing tests for buildapi rely on the filt command and I don't think we should expose the editable wheel format there.

@takluyver
Copy link
Member

Thanks, I'll take a look. :-)

I'm not sure what you mean about tests for buildapi relying on the flit command - this one looks like it's calling buildapi directly, for instance:

https://github.com/takluyver/flit/blob/734ab12fc5bfadf7e37dc303d44fd517f7ebda1b/flit_core/flit_core/tests/test_buildapi.py#L44-L49

@takluyver
Copy link
Member

Nice and simple, thank-you. I think if you can add a simple test to exercise the function exposed in buildapi, this should be fine.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 21, 2021

@takluyver I somehow missed the buildapi tests in flit_core. Proof I needed holidays, I guess.

I now added the missing tests.

@sbidoul
Copy link
Member Author

sbidoul commented Sep 29, 2021

@takluyver FYI PEP 660 has been merged in pip and will be part of the 21.3 release in October. \o/

@takluyver takluyver merged commit 01e64e9 into pypa:master Sep 29, 2021
@takluyver
Copy link
Member

Thanks, and congratulations on getting the PEP you worked on accepted & implemented!

@sbidoul sbidoul deleted the pep517-editable-sbi branch September 29, 2021 15:47
@sbidoul
Copy link
Member Author

sbidoul commented Sep 29, 2021

Thanks, it was quite a ride, I should say :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants