Skip to content

refactor(build): build pure Python wheel and noarch: python conda#738

Merged
rapids-bot[bot] merged 14 commits intorapidsai:mainfrom
gforsyth:pure_python
Dec 4, 2025
Merged

refactor(build): build pure Python wheel and noarch: python conda#738
rapids-bot[bot] merged 14 commits intorapidsai:mainfrom
gforsyth:pure_python

Conversation

@gforsyth
Copy link
Contributor

@gforsyth gforsyth commented Nov 6, 2025

@gforsyth gforsyth requested review from a team as code owners November 6, 2025 17:31
@gforsyth gforsyth requested a review from msarahan November 6, 2025 17:31
@gforsyth gforsyth added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 6, 2025
@gforsyth gforsyth marked this pull request as draft November 7, 2025 14:10
@copy-pr-bot
Copy link

copy-pr-bot bot commented Nov 7, 2025

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.

@gforsyth gforsyth marked this pull request as ready for review November 7, 2025 15:20
Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Gil! 🙏

Had a couple minor comments and a question below

ci/build_docs.sh Outdated

rapids-logger "Downloading artifacts from previous jobs"
PYTHON_CHANNEL=$(rapids-download-conda-from-github python)
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name "conda_python" cuxfilter --pure)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think shell lets us nest quotes like this. If we do need to nest quotes, the usual way is through concatenation of strings, which involves alternating between single and double quotes

That said, given other commands similar to this one don't use quotes, maybe we can just drop them

Suggested change
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name "conda_python" cuxfilter --pure)")
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name conda_python cuxfilter --pure)")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash doesn't have quoting rules that I like, but they do allow for nesting quotes -- and alternating single and double quotes is dangerous in bash as they have different expansion semantics (specifically that single quotes prevent variable expansion)


../ci/validate_wheel.sh "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

RAPIDS_PACKAGE_NAME="$(rapids-package-name wheel_python cuxfilter --pure --cuda "$RAPIDS_CUDA_VERSION")"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RAPIDS_PACKAGE_NAME="$(rapids-package-name wheel_python cuxfilter --pure --cuda "$RAPIDS_CUDA_VERSION")"
RAPIDS_PACKAGE_NAME="$(rapids-package-name wheel_python cuxfilter --pure --cuda ${RAPIDS_CUDA_VERSION})"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a shellcheck smell -- you always quote around variable expansions to prevent unexpected word-splitting or globbing


rapids-logger "Downloading artifacts from previous jobs"
PYTHON_CHANNEL=$(rapids-download-conda-from-github python)
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name "conda_python" cuxfilter --pure)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name "conda_python" cuxfilter --pure)")
PYTHON_CHANNEL=$(rapids-download-from-github $(rapids-package-name conda_python cuxfilter --pure)")


rapids-logger "Downloading artifacts from previous jobs"
PYTHON_CHANNEL=$(rapids-download-conda-from-github python)
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name "conda_python" cuxfilter --pure)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name "conda_python" cuxfilter --pure)")
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name conda_python cuxfilter --pure)")

ci/test_wheel.sh Outdated

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
CUXFILTER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuxfilter_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-github python)
CUXFILTER_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel_python" cuxfilter --pure --cuda "$RAPIDS_CUDA_VERSION")")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CUXFILTER_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel_python" cuxfilter --pure --cuda "$RAPIDS_CUDA_VERSION")")
CUXFILTER_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name wheel_python cuxfilter --pure --cuda ${RAPIDS_CUDA_VERSION})")

date: ${{ inputs.date }}
script: ci/build_python.sh
sha: ${{ inputs.sha }}
pure-conda: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need something similar in the case of wheels?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a pure-wheel: true input for wheels -- that's been changed to handle matrix filtering upstream.

@gforsyth gforsyth changed the base branch from main to release/25.12 November 17, 2025 20:31
@gforsyth
Copy link
Contributor Author

This is ready for another look @jakirkham

@gforsyth gforsyth changed the base branch from release/25.12 to main November 18, 2025 17:23
Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does look to me like this is achieving what we want (only 2 conda builds and 2 wheel builds, 1 per CUDA major) and the package metadata looks correct.

But I left a couple of suggestions on the implementation, enough that I think it's worth blocking the PR.


rapids-logger "Downloading artifacts from previous jobs"
PYTHON_CHANNEL=$(rapids-download-conda-from-github python)
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name conda_python cuxfilter --pure --cuda "${RAPIDS_CUDA_VERSION}")")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a suggestion about this on the upstream issue... I think we'll need to update the RAPIDS developer docs to account for this new need to invoke rapids-package-name:

rapidsai/build-planning#43 (comment)

Comment on lines +19 to +21

RAPIDS_PACKAGE_NAME="$(rapids-package-name wheel_python cuxfilter --pure --cuda "${RAPIDS_CUDA_VERSION}")"
export RAPIDS_PACKAGE_NAME
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RAPIDS_PACKAGE_NAME="$(rapids-package-name wheel_python cuxfilter --pure --cuda "${RAPIDS_CUDA_VERSION}")"
export RAPIDS_PACKAGE_NAME

Was this left over from an earlier iteration?

It's at the end of this script that isn't called by anything else, so I don't think it'll actually affect anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that's required -- the conda-python-build shared workflow looks for that environment variable and if it is set it uses that as the artifact name when uploading.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is build_wheel.sh, I don't think it's involved in the conda build, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, missed the filename. The same pattern also applies for wheels-build.yaml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, it's setting it for the benefit of this:

https://github.com/rapidsai/shared-workflows/blob/32156d9710c4a6994bb8bab8ddf1441aae03c12c/.github/workflows/wheels-build.yaml#L277

To be used as input in the upload step:

https://github.com/rapidsai/shared-workflows/blob/32156d9710c4a6994bb8bab8ddf1441aae03c12c/.github/workflows/wheels-build.yaml#L291

It wasn't obvious to me that this was modifying something in the environment for the next shared-workflows step to pick up. But I understand how that's working now.

Co-authored-by: James Lamb <jaylamb20@gmail.com>
Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No other comments from me, very excited we're improving the handling of libraries like this! Thanks for the explanations.

@gforsyth
Copy link
Contributor Author

gforsyth commented Dec 4, 2025

/merge

@rapids-bot rapids-bot bot merged commit b9964b1 into rapidsai:main Dec 4, 2025
26 checks passed
@gforsyth gforsyth deleted the pure_python branch December 4, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants