-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Default to PEP 517-based builds #843
Conversation
b366173
to
e0cd73e
Compare
So it looks like resolution is meaningfully faster:
But installation is meaningfully slower:
|
This using |
Okay, skipping
I think that's fine to do, honestly? |
6819601
to
1aa97b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love it if we could get away with this!
The perf improvement is impressive!
@konstin - Two questions: (1) should we add a flag to disable this? I kind of think we should. And (2) why do you think cold-install got faster? |
Agreed
Good question, should i look into it? |
Sounds good, I'll add the flag. Yeah, if you can, that would be great. I was comparing |
crates/puffin-build/src/lib.rs
Outdated
|
||
// If we're using the default backend configuration, skip `get_requires_for_build_*`, since | ||
// we already installed the requirements above. | ||
if pep517_backend != default_backend { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized... we can actually skip this if we know the build backend doesn't implement it? Like poetry-core
always returns []
.
f16ec58
to
c9c2e08
Compare
9102ee4
to
0a211cb
Compare
0a211cb
to
dcc4156
Compare
What requirements and python version did you use for the benchmarking numbers? I get no difference when building
|
I suspect that there is no difference when building by hand (there shouldn't be, right? the PEP 517 interface is just a thin wrapper). Instead I suspect the difference is from something we're doing in |
## Summary PEP 517 build isolation #843 has not yet been mentioned in the PIP compatibility documentation. Add a section for it. ## Test Plan Visual inspection only ## Open Questions > in most cases, swapping out `pip install` for `uv pip install` should "just work". In the first non-trivial case I tried, it worked for a short time and then [started failing](#4069 (comment)). Is there any data out there on how many top 100 or top 1000 packages work with PEP 517 build isolation? How can someone specify `--no-build-isolation` for just one package/line in `requirements.txt`? --------- Co-authored-by: Charlie Marsh <[email protected]>
Summary
Our current setup uses the legacy
setup.py
-based builds if apyproject.toml
file isn't present. This matches pip's behavior. However,pypa/build
uses PEP 517-based builds in such cases, and it looks like pip plans to make that the default (pypa/pip#9175), with the limiting factor being performance issues related to isolated builds.This is now the default behavior, but the
--legacy-setup-py
flag allows users to opt-in to usingsetup.py
directly for distributions that lack apyproject.toml
.