diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 385a5da20..80685c6a8 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -33,7 +33,14 @@ rapids-generate-version > ./VERSION RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -cd "${package_dir}" +touch /tmp/build-constraints.txt + +if [[ "${package_name}" == "cuspatial" ]]; then + # Downloads libcuspatial wheel from this current build, + # then ensures 'cuspatial' wheel builds always use the 'libcuspatial' just built in the same CI run. + RAPIDS_PY_WHEEL_NAME="libcuspatial_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libcuspatial_dist + echo "libcuspatial-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/libcuspatial_dist/libcuspatial_*.whl)" > /tmp/constraints-build.txt +fi rapids-logger "Generating build requirements" declare -r matrix_selectors="cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};cuda_suffixed=true" @@ -54,8 +61,11 @@ rapids-logger "Installing build requirements" python -m pip install \ -v \ --prefer-binary \ + --constraint /tmp/constraints-build.txt \ -r /tmp/requirements-build.txt +cd "${package_dir}" + rapids-logger "Building '${package_name}' wheel" python -m pip wheel \ -w dist \ diff --git a/ci/build_wheel_cuspatial.sh b/ci/build_wheel_cuspatial.sh index e581a3e76..171bfa6a4 100755 --- a/ci/build_wheel_cuspatial.sh +++ b/ci/build_wheel_cuspatial.sh @@ -3,15 +3,4 @@ set -euo pipefail -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" - -# Downloads libcuspatial wheel from this current build, -# then ensures 'cuspatial' wheel builds always use the 'libcuspatial' just built in the same CI run. -# -# Using env variable PIP_CONSTRAINT is necessary to ensure the constraints -# are used when creating the isolated build environment. -RAPIDS_PY_WHEEL_NAME="libcuspatial_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp /tmp/libcuspatial_dist -echo "libcuspatial-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/libcuspatial_dist/libcuspatial_*.whl)" > /tmp/constraints.txt -export PIP_CONSTRAINT="/tmp/constraints.txt" - ci/build_wheel.sh cuspatial python/cuspatial python