Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,30 @@ rapids-logger "Building '${package_name}' wheel"

sccache --stop-server 2>/dev/null || true

build_env_dir="/tmp/${package_name}-wheel-build-env"
# `build` preserves this environment after a failed build for debugging. CI
# retries must start with an empty directory, as required by `--env-dir`.
rm -rf "${build_env_dir}"

RAPIDS_PIP_WHEEL_ARGS=(
-w dist
-v
--no-deps
--disable-pip-version-check
--wheel
--outdir dist
--verbose
# A fixed location keeps isolated-build include paths stable for sccache.
--env-dir "${build_env_dir}"
--dependency-constraints-txt "${PIP_CONSTRAINT}"
)

# Add py-api setting for stable ABI builds
if [[ "${stable_abi}" == "true" ]] && [[ -n "${RAPIDS_PY_API:-}" ]]; then
RAPIDS_PIP_WHEEL_ARGS+=(--config-settings="skbuild.wheel.py-api=${RAPIDS_PY_API}")
fi

# Only use --build-constraint when build isolation is enabled.
#
# Passing '--build-constraint' and '--no-build-isolation` together results in an error from 'pip',
# but we want to keep environment variable PIP_CONSTRAINT set unconditionally.
# PIP_NO_BUILD_ISOLATION=0 means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735)
if [[ "${PIP_NO_BUILD_ISOLATION:-}" != "0" ]]; then
RAPIDS_PIP_WHEEL_ARGS+=(--build-constraint="${PIP_CONSTRAINT}")
RAPIDS_PIP_WHEEL_ARGS+=(--config-setting="skbuild.wheel.py-api=${RAPIDS_PY_API}")
fi

# unset PIP_CONSTRAINT (set by rapids-init-pip)... it doesn't affect builds as of pip 25.3, and
# results in an error from 'pip wheel' when set and --build-constraint is also passed
# `build` receives the same generated constraints explicitly. Unset the
# environment variable so it does not constrain the frontend installation.
unset PIP_CONSTRAINT
rapids-pip-retry wheel \

rapids-python-build-retry \
"${RAPIDS_PIP_WHEEL_ARGS[@]}" \
.

Expand Down
5 changes: 3 additions & 2 deletions ci/build_wheel_cuvs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail
Expand All @@ -14,7 +14,8 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
# then ensures 'cuvs' wheel builds always use the 'libcuvs' just built in the same CI run.
#
# env variable 'PIP_CONSTRAINT' is set up by rapids-init-pip. It constrains all subsequent
# 'pip install', 'pip download', etc. calls (except those used in 'pip wheel', handled separately in build scripts)
# 'pip install', 'pip download', etc. calls (except the isolated wheel build,
# which is handled separately by ci/build_wheel.sh)
LIBCUVS_WHEELHOUSE=$(rapids-download-from-github "$(rapids-artifact-name wheel_cpp libcuvs cuvs --cuda "$RAPIDS_CUDA_VERSION")")
echo "libcuvs-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${LIBCUVS_WHEELHOUSE}"/libcuvs_*.whl)" >> "${PIP_CONSTRAINT}"

Expand Down
6 changes: 1 addition & 5 deletions ci/build_wheel_libcuvs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail
Expand All @@ -25,10 +25,6 @@ rapids-pip-retry install \
--prefer-binary \
-r /tmp/requirements-build.txt

# build with '--no-build-isolation', for better sccache hit rate
# 0 really means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735)
export PIP_NO_BUILD_ISOLATION=0

ci/build_wheel.sh libcuvs ${package_dir}
ci/validate_wheel.sh ${package_dir} "${RAPIDS_WHEEL_BLD_OUTPUT_DIR}"

Expand Down
Loading