Skip to content

Commit

Permalink
move PIP_CONSTRAINT stuff back, remove 'declare'
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Oct 14, 2024
1 parent 6c64e73 commit 29b005e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
12 changes: 1 addition & 11 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,8 @@ rapids-generate-version > ./VERSION

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

touch /tmp/constraints-build.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"
matrix_selectors="cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};cuda_suffixed=true"

rapids-dependency-file-generator \
--output requirements \
Expand All @@ -61,7 +52,6 @@ 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}"
Expand Down
11 changes: 11 additions & 0 deletions ci/build_wheel_cuspatial.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,15 @@

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

0 comments on commit 29b005e

Please sign in to comment.