Skip to content

Use UV to build Python wheels#400

Merged
oleksandr-pavlyk merged 1 commit into
NVIDIA:mainfrom
oleksandr-pavlyk:build-python-wheels-with-uv
Jun 30, 2026
Merged

Use UV to build Python wheels#400
oleksandr-pavlyk merged 1 commit into
NVIDIA:mainfrom
oleksandr-pavlyk:build-python-wheels-with-uv

Conversation

@oleksandr-pavlyk

Copy link
Copy Markdown
Collaborator
  1. This follows the lead of similar change on CCCL side: Switch from pyenv to uv cccl#8398
  2. Transitioning away from using pyenv allows avoiding the need to build CPython on every pull request, cutting down build time.

Closes #399

1. This follows the lead of similar change on CCCL side: NVIDIA/cccl#8398
2. Transitioning away from using pyenv allows avoiding the need to
   build CPython on every pull request, cutting down build time.
@oleksandr-pavlyk oleksandr-pavlyk added the area: ci Related to CI infrastructure label Jun 30, 2026
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jun 30, 2026
@oleksandr-pavlyk oleksandr-pavlyk moved this from Todo to In Progress in CCCL Jun 30, 2026
@oleksandr-pavlyk oleksandr-pavlyk self-assigned this Jun 30, 2026
@oleksandr-pavlyk

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

This comment was marked as outdated.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved CUDA wheel build reliability by using the intended Python version throughout merge and repair steps.
    • Standardized wheel and repair commands to run in the prepared environment, reducing mismatches during CI builds.
  • Chores

    • Updated CI Python environment setup to use a more consistent temporary virtual environment flow.
    • Added a version check to fail fast if the prepared environment does not match the requested Python version.

Walkthrough

ci/pyenv_helper.sh replaces the pyenv/shim-based CPython build with a uv-based virtual environment setup. ci/build_multi_cuda_wheel.sh sources the updated helper, calls setup_python_env, and replaces all $PYTHON references with plain python for wheel and auditwheel operations.

Changes

pyenv to uv migration

Layer / File(s) Summary
uv-based venv setup
ci/pyenv_helper.sh
setup_python_env() detects/installs uv, creates a venv at NVBENCH_PYTHON_VENV, activates it (Windows or POSIX path), and exits with an error if the interpreter major/minor version does not match ${py_version}.
build script wired to new helper
ci/build_multi_cuda_wheel.sh
Sources ci/pyenv_helper.sh, calls setup_python_env "${py_version}", installs wheel via python -m pip, and replaces all $PYTHON -m wheel/$PYTHON -m auditwheel calls with python -m ..., removing --break-system-packages.

Assessment against linked issues

Objective Addressed Explanation
Replace pyenv CPython build with uv [#399]

Out-of-scope changes

No out-of-scope changes found.


Comment @coderabbitai help to get the list of available commands.

@oleksandr-pavlyk oleksandr-pavlyk marked this pull request as ready for review June 30, 2026 16:44
@oleksandr-pavlyk oleksandr-pavlyk requested a review from shwina June 30, 2026 16:44
@oleksandr-pavlyk oleksandr-pavlyk moved this from In Progress to In Review in CCCL Jun 30, 2026
@oleksandr-pavlyk oleksandr-pavlyk enabled auto-merge (squash) June 30, 2026 17:23
@oleksandr-pavlyk oleksandr-pavlyk merged commit 8d6588a into NVIDIA:main Jun 30, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci Related to CI infrastructure

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Avoid building CPython when building cuda.bench wheels

2 participants