Skip to content

Add build dependency groups for editable development - #3274

Merged
rwgk merged 3 commits into
mainfrom
rwgk/editable-build-dependency-groups
Oct 29, 2026
Merged

rwgk merged 3 commits into
mainfrom
rwgk/editable-build-dependency-groups

Conversation

@rwgk

@rwgk rwgk commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

codex on behalf of Ralf:

Description

When building CUDA Python packages from the same checkout, pip’s isolated build environments do not reuse dependencies already installed editably in the active environment. A build can therefore select cuda-pathfinder or cuda-bindings from PyPI instead of using the local sources.

CI addresses this with constraint files that select the intended locally built dependency wheels while preserving build isolation. For editable development, however, this approach can require both an editable installation and a separate dependency-wheel build.

This PR enables an alternative using --no-build-isolation: prepare the external build tools first, then install pathfinder, bindings, and core editably in dependency order. Each build can then use the local dependencies already installed in the environment, avoiding separate dependency-wheel builds.

The new build dependency groups make that preparation explicit and convenient. The test groups are unchanged, and synchronization comments keep the tooling lists aligned with the unchanged isolated-build requirements.

For example, from the repository root in an activated virtual environment, with the CUDA toolkit configured and submodules initialized:

python -m pip install \
    --group cuda_pathfinder/pyproject.toml:build \
    --group cuda_bindings_13/pyproject.toml:build \
    --group cuda_core/pyproject.toml:build

python -m pip install --no-build-isolation -e ./cuda_pathfinder
python -m pip install --no-build-isolation -e ./cuda_bindings_13
python -m pip install --no-build-isolation -e ./cuda_core

The separate installation commands ensure that each local dependency is available before the next package builds.

Validation

Build-group installation in a fresh environment and pip check passed. Verified that the groups match the existing external build requirements and preserve project metadata. SKIP=lychee pre-commit run --all-files passed.

Checklist

  • I have read the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Oct 28, 2026
@rwgk rwgk added this to the cuda.bindings next milestone Oct 28, 2026
@rwgk rwgk added CI/CD CI/CD infrastructure and removed cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Oct 28, 2026
@rwgk rwgk self-assigned this Oct 28, 2026
@rwgk

rwgk commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

codex on behalf of Ralf:

/ok to test 90d80e2

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Doc Preview CI
Preview removed because the pull request was closed or merged.

@rwgk
rwgk marked this pull request as ready for review October 29, 2026 00:12
@rwgk
rwgk requested a review from juenglin October 29, 2026 00:13
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 7f171e8 and 5ab5d7f.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 90d80e2 and 7f171e8.

Files selected for processing: 3
  • cuda_bindings_13/pyproject.toml
  • cuda_core/pyproject.toml
  • cuda_pathfinder/pyproject.toml
Files with no reviewable changes: 1
  • cuda_pathfinder/pyproject.toml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Chores
    • Added build dependency groups listing the tools required for packaging across the CUDA components. The build configuration now includes notes to keep these tool lists synchronized with the corresponding build requirements. No user-facing functionality or public interfaces changed.

Three package configurations add a build dependency group. The groups list setuptools and related build requirements. Comments document synchronization with build-system requirements and separate local cuda-pathfinder installation where applicable.

Changes: Build dependency groups

Layer / File(s) Summary
Define build dependencies
cuda_bindings_13/pyproject.toml, cuda_core/pyproject.toml, cuda_pathfinder/pyproject.toml
The three configurations add a build dependency group with setuptools and related build requirements. Comments document synchronization with build-system requirements; the cuda_bindings_13 and cuda_core groups also note that local cuda-pathfinder installation is separate.

Possibly related issues

Possibly related PRs

  • NVIDIA/cuda-python#3272: Adds a cuda_core build-system requirement that must stay coordinated with the dependency-groups.build declaration updated here.

Suggested labels: enhancement, cuda.bindings, cuda.core, cuda.pathfinder

Suggested reviewers: seberg

Priority: Pending latest changes

Change: Feature

Merge Risk: Minimal · previous review 7f171

No actionable merge-blocking risk remains in the reviewed changes.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@rwgk
rwgk removed the request for review from juenglin October 29, 2026 00:19
Comment thread cuda_bindings_13/pyproject.toml Outdated
Comment thread cuda_core/pyproject.toml Outdated
Comment thread cuda_pathfinder/pyproject.toml Outdated
Restore the original test groups while retaining explicit build groups for editable development without build isolation. Test environments keep their existing requirements without gaining package build tools.

Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
@github-actions github-actions Bot added cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Oct 29, 2026
@rwgk

rwgk commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

codex on behalf of Ralf:

Addressed in 7f171e8. The new build groups are independent, and all three test groups now match their pre-PR contents. Bindings and core retain their existing Cython and setuptools test dependencies for compiling Cython test extensions.

The documented --no-build-isolation example remains unchanged: it installs the build groups explicitly before the ordered editable installs. TOML equivalence checks and SKIP=lychee pre-commit run --all-files passed.

Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
@leofang

leofang commented Oct 29, 2026

Copy link
Copy Markdown
Member

The inline comments will do for now. Long-term wise, we should explore solutions such as Renovate App to automate and keep them in-sync.

@rwgk
rwgk merged commit 1e1bce1 into main Oct 29, 2026
118 checks passed
@rwgk
rwgk deleted the rwgk/editable-build-dependency-groups branch October 29, 2026 14:58
github-actions Bot pushed a commit that referenced this pull request Oct 29, 2026
Removed preview folders for the following PRs:
- PR #2494
- PR #3186
- PR #3259
- PR #3274
- PR #3275
- PR #3279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants