Skip to content
Merged
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
23 changes: 23 additions & 0 deletions tools/rapids-init-pip
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
#
# Initializes a `pip` constraint file. Ensures that environment variable
# `PIP_CONSTRAINT` is populated and points to a file that exists.
#
# This allows the unconditional use of that variable + script in CI scripts, like this:
#
# source rapids-init-pip;
# LIBRMM_WHEELHOUSE=$(
# RAPIDS_PY_WHEEL_NAME="librmm_cu12" rapids-get-pr-wheel-artifact rmm 1909 cpp
# )
# echo "librmm-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${LIBRMM_WHEELHOUSE}"/librmm_*.whl)" >> "${PIP_CONSTRAINT}"
#
# This is intended to be `source`'d, not invoked as an executable.
#
# Note that the exact name `PIP_CONSTRAINT` is specifically recognized by `pip`:
# https://pip.pypa.io/en/latest/cli/pip_install/#cmdoption-c. Exporting it is important
# to ensure that the constraints are respected by all calls to `pip`, including nested
# calls that happen when setting up an isolation build environment for wheel builds.
#
PIP_CONSTRAINT="${PIP_CONSTRAINT:-$(mktemp -d)/constraints.txt}"
touch "${PIP_CONSTRAINT}"
export PIP_CONSTRAINT