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
konstin
left a comment
There was a problem hiding this comment.
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 |
|
|
||
| // 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.
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 <charlie.r.marsh@gmail.com>
Summary
Our current setup uses the legacy
setup.py-based builds if apyproject.tomlfile isn't present. This matches pip's behavior. However,pypa/builduses 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-pyflag allows users to opt-in to usingsetup.pydirectly for distributions that lack apyproject.toml.