-
Notifications
You must be signed in to change notification settings - Fork 245
Switch to uv build frontend and add top-level uv workspace #1615
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
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
0e6820a to
3505cf1
Compare
|
/ok to test |
- Add root pyproject.toml as virtual uv workspace covering cuda_bindings, cuda_core, cuda_pathfinder, cuda_python, and cuda_python_test_helpers. - Declare workspace-level cu12/cu13 conflicts so uv lock can resolve the mutually-exclusive cuda-toolkit version requirements. - Add [tool.cibuildwheel] build-frontend = "build[uv]" to cuda_bindings and cuda_core. - Add [tool.uv.sources] workspace references to cuda_bindings and cuda_core so transitive workspace deps resolve during lock. - Add cuda-pathfinder to cuda_core build-system.requires so uv sees the transitive build dependency chain. - Make cuda_python dependencies static in pyproject.toml. - Replace pip with uv across all CI workflows (build-wheel, test-wheel-linux, test-wheel-windows, build-docs, coverage) and ci/tools/run-tests. - Install uv via astral-sh/setup-uv@v5 in every workflow. - Use uv build --wheel, uv pip install, and uv sync --only-group for dependency group installation. - Exclude uv.lock from SPDX and large-file pre-commit checks. - Generate uv.lock for the workspace. Co-authored-by: Cursor <cursoragent@cursor.com>
- Revert cuda_python dependencies and optional-dependencies back to dynamic so setup.py controls the precise version pin at wheel-build time. - Pin astral-sh/setup-uv to commit SHA d4b2f3b6 (v5) in all workflows. - Remove twine install and twine check steps (uv build validates wheel metadata). - Regenerate uv.lock. Co-authored-by: Cursor <cursoragent@cursor.com>
- Replace duplicated test deps in build-wheel.yml with uv sync --package <pkg> --only-group test --no-install-project. - Improve conflict comments to clarify they are about cuda-toolkit version constraints, not cuda-bindings compatibility. Co-authored-by: Cursor <cursoragent@cursor.com>
uv build does not validate long_description rendering or metadata completeness the way twine check --strict does. Restore the twine install and all four twine check steps (pathfinder, bindings, cuda-python, core). Co-authored-by: Cursor <cursoragent@cursor.com>
3e1070a to
36cf441
Compare
|
/ok to test |
CI workflows run without a virtual environment, so uv pip requires --system to install into the system Python. Also rebase on latest main to resolve merge conflicts (.gitattributes, .pre-commit-config). Co-authored-by: Cursor <cursoragent@cursor.com>
36cf441 to
9c9757f
Compare
|
/ok to test |
1 similar comment
|
/ok to test |
uv build from a workspace member directory outputs to the workspace root's dist/, not the member's dist/. Add --output-dir dist to both cuda_pathfinder and cuda_python uv build calls so wheels land where subsequent steps expect them. Co-authored-by: Cursor <cursoragent@cursor.com>
b5aaea0 to
a736c3d
Compare
|
/ok to test |
uv sync always creates/uses a virtual environment and doesn't support --system. Since CI installs everything into the system Python, use uv export to extract dependency group requirements and pipe them to uv pip install --system instead. coverage.yml is left using uv sync since it intentionally creates and targets a .venv. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/ok to test |
|
Without --frozen, uv export tries to update the lockfile which triggers setuptools-scm metadata extraction. This fails in CI because the git checkout doesn't have the context setuptools-scm needs. --frozen tells uv to use the committed lockfile as-is. Also switch coverage.yml from uv sync to the same uv export pattern for consistency. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/ok to test |
| git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "cuda-core-v*[0-9]*"] | ||
|
|
||
| [tool.uv] | ||
| conflicts = [[{ extra = "cu12" }, { extra = "cu13" }]] |
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.
Ah, it's already here, so this PR will close #1247
The build[uv] frontend inside cibuildwheel creates build isolation environments with paths derived from the uv cache directory. On Windows, the cumulative PATH length pushes past cmd.exe's ~8KB limit when running vcvarsall.bat, specifically for free-threaded Python (py3.14t) which has additional path entries. Set UV_CACHE_DIR=C:\uvc in CIBW_ENVIRONMENT_WINDOWS for all three cibuildwheel steps to keep temp paths short. Co-authored-by: Cursor <cursoragent@cursor.com>
|
/ok to test |
Summary
pyproject.tomlas a virtual uv workspace coveringcuda_bindings,cuda_core,cuda_pathfinder,cuda_python, andcuda_python_test_helpers.build[uv]backend forcuda_bindingsandcuda_core.pipusage withuvacross CI workflows (build-wheel,test-wheel-linux,test-wheel-windows,build-docs,coverage) andci/tools/run-tests.astral-sh/setup-uv@v5in every workflow.uv build --wheel,uv pip install, anduv sync --only-groupfor dependency group installation.uv lockcan resolve the mutually-exclusivecuda-toolkitversion requirements.uv.lockfor the workspace.Test plan
uv lockreproduces the same lockfile from a clean checkout with CUDA_HOME setMade with Cursor