-
Notifications
You must be signed in to change notification settings - Fork 294
feat: option to build directly with uv #2322
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
base: main
Are you sure you want to change the base?
Conversation
6801268 to
1e1738d
Compare
cab0595 to
1d381f6
Compare
b8b0cd2 to
53ae7ed
Compare
|
I have a question on this. UV supports workspaces, and a 'uv build' of a workspace may result in more than one wheel. I currently have a project which builds ~10 wheels per target platform, and I'd love to be able to do this with a single invocation of CIBuildWheel. Is that something that could be made possible (or something that is already possible)? The reason I'm asking is that I haven't been able to get |
|
That's interesting, probably! We might/will need to handle pure-Python output wheels, but other than that I think it should work. Nice to know this will enable something (especially since it's been annoying to make work due to astral-sh/uv#12639). I'll try to test that. |
4a64a67 to
eb53a73
Compare
|
I'm happy to push this off to 3.1 for now in interests of getting a 3.0 out. This is just a new option, not a change. |
eb53a73 to
11de286
Compare
d88de26 to
75fdded
Compare
75fdded to
244b654
Compare
c5f6934 to
75f2394
Compare
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> tests: add uv to tests Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> fix: uv doesn't pick special Pythons at the top of the path Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> fix: set uv build constraints too Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> fix: uv doesn't support PyPy 3.8 Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> tests: add pyproject.toml for failing test Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Revert "tests: add pyproject.toml for failing test" This reverts commit 619bde3. tests: skip uv output test Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
75f2394 to
bed8622
Compare
|
Looks like now we get all naitve building works, the only failing tests are cross-build for iOS and Android. I'm not sure how python or uv works on these platforms, I'll take a look on Android because I don't have a macos machine. |
|
Nevermind, uv can't do corss build, we should skip using uv on Android or iOS just like what we did for pip |
|
you forget to enable test_failed_build_with_so_files for uv, it's still skipped |
|
tested this locally, musllinux docker image doesn't have uv installed |
|
uv is on musllinux, at least for common archs: https://manylinuxinspector.joerick.me/#/ This predates the update to Android, so not surprising that it wasn't skipped here. :) |
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
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.
Pull request overview
Adds support for selecting uv directly as the build frontend (in addition to existing build, build[uv], and pip) and updates validation + tests accordingly.
Changes:
- Extend
BuildFrontendNameand config/schema parsing to acceptuv. - Implement
uv buildinvocation paths across platforms (Linux/macOS/Windows) and update troubleshooting detection. - Expand test matrix/fixtures and add config parsing coverage for
build-frontend = "uv".
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| unit_test/options_test.py | Adds unit test coverage for parsing build-frontend = "uv". |
| test/test_android.py | Expands Android negative frontend test to include uv. |
| test/conftest.py | Adds uv to build-frontend fixture params and adjusts skips for unsupported platforms. |
| cibuildwheel/platforms/windows.py | Treats uv as a build frontend and adds a uv build execution path. |
| cibuildwheel/platforms/macos.py | Treats uv as a build frontend; installs needed tools and adds uv build path. |
| cibuildwheel/platforms/linux.py | Adds uv build execution path in containers and updates troubleshoot matching. |
| cibuildwheel/platforms/ios.py | Explicitly rejects uv frontend on iOS (matching existing uv limitations). |
| cibuildwheel/frontend.py | Extends BuildFrontendName literal to include uv. |
| bin/generate_schema.py | Updates JSON schema generation to document/validate uv as a build frontend. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
|
looks like the ci is failed on a network error, not our code Do we still missing something in this PR? Except uv workspace support. I think it need a seprated pr to support multiple wheels output in single build |
|
Yes, workspace support can be a followup PR, and I also would like to see if we can support uv for android; I don't see why |
Adding an option to build directly with uv. Will conflict with #2321, so probably will rebase after that one.