Skip to content

Conversation

@kkraus14
Copy link
Collaborator

Summary

  • Adds a root pyproject.toml as a virtual uv workspace covering cuda_bindings, cuda_core, cuda_pathfinder, cuda_python, and cuda_python_test_helpers.
  • Switches cibuildwheel to build[uv] backend for cuda_bindings and cuda_core.
  • Replaces all pip usage with uv across CI workflows (build-wheel, test-wheel-linux, test-wheel-windows, build-docs, coverage) and ci/tools/run-tests.
  • Installs uv via astral-sh/setup-uv@v5 in every workflow.
  • Uses uv build --wheel, uv pip install, and uv sync --only-group for dependency group installation.
  • Declares workspace-level cu12/cu13 conflicts so uv lock can resolve the mutually-exclusive cuda-toolkit version requirements.
  • Generates uv.lock for the workspace.

Test plan

  • CI passes on build-wheel workflow (uv build produces correct wheels)
  • CI passes on test-wheel-linux (uv pip install + uv sync --only-group works)
  • CI passes on test-wheel-windows (uv pip install + uv sync --only-group works)
  • Build-docs workflow succeeds with uv pip install
  • Coverage workflow succeeds with uv venv + uv pip install
  • uv lock reproduces the same lockfile from a clean checkout with CUDA_HOME set

Made with Cursor

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Feb 12, 2026

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.

@kkraus14 kkraus14 force-pushed the uv-build-frontend-and-workspace branch from 0e6820a to 3505cf1 Compare February 12, 2026 18:58
@kkraus14
Copy link
Collaborator Author

/ok to test

kkraus14 and others added 4 commits February 12, 2026 22:16
- 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>
@kkraus14 kkraus14 force-pushed the uv-build-frontend-and-workspace branch from 3e1070a to 36cf441 Compare February 13, 2026 03:18
@kkraus14
Copy link
Collaborator Author

/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>
@kkraus14 kkraus14 force-pushed the uv-build-frontend-and-workspace branch from 36cf441 to 9c9757f Compare February 13, 2026 03:22
@kkraus14
Copy link
Collaborator Author

/ok to test

1 similar comment
@kkraus14
Copy link
Collaborator Author

/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>
@kkraus14 kkraus14 force-pushed the uv-build-frontend-and-workspace branch from b5aaea0 to a736c3d Compare February 13, 2026 03:35
@kkraus14
Copy link
Collaborator Author

/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>
@kkraus14
Copy link
Collaborator Author

/ok to test

@github-actions
Copy link

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>
@kkraus14
Copy link
Collaborator Author

/ok to test

git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "cuda-core-v*[0-9]*"]

[tool.uv]
conflicts = [[{ extra = "cu12" }, { extra = "cu13" }]]
Copy link
Member

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>
@kkraus14
Copy link
Collaborator Author

/ok to test

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants