Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pure Python wheels. #96

Merged
merged 3 commits into from
Mar 5, 2024
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
33 changes: 21 additions & 12 deletions tools/rapids-package-name
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,27 @@ fi
pkg_type="$1"

append_cuda=0
append_pyver=0
append_wheelname=0
append_pyver=0
append_arch=0
bdice marked this conversation as resolved.
Show resolved Hide resolved

case "${pkg_type}" in
conda_cpp)
append_cuda=1
append_arch=1
;;
conda_python)
append_cuda=1
append_pyver=1
append_arch=1
;;
wheel_python)
append_pyver=1
append_wheelname=1
# Pure wheels do not need a pyver or arch
if [[ ! -v RAPIDS_PY_WHEEL_PURE ]] || [[ "${RAPIDS_PY_WHEEL_PURE}" != "1" ]]; then
vyasr marked this conversation as resolved.
Show resolved Hide resolved
append_pyver=1
append_arch=1
fi
;;
*)
rapids-echo-stderr "Nonstandard package type '${pkg_type}'"
Expand All @@ -48,21 +55,23 @@ if (( append_wheelname )) && [[ -v RAPIDS_PY_WHEEL_NAME ]] && [[ "${RAPIDS_PY_WH
pkg_name+="_${RAPIDS_PY_WHEEL_NAME}"
fi

# for python package types, add pyver
# for python package types (except pure wheels), add pyver
if (( append_pyver == 1 )); then
pkg_name+="_${RAPIDS_PY_VERSION//./}"
pkg_name+="_py${RAPIDS_PY_VERSION//./}"
fi

# for cpp and python package types, always append arch
if [[ -v RAPIDS_ARCH ]] && [[ "${RAPIDS_ARCH}" != "" ]]; then
# use arch override if specified
pkg_name+="_${RAPIDS_ARCH}"
else
# otherwise use architecture of the host that's running the upload command
pkg_name+="_$(arch)"
# for cpp and python package types (except pure wheels), append the arch
if (( append_arch == 1)); then
if [[ -v RAPIDS_ARCH ]] && [[ "${RAPIDS_ARCH}" != "" ]]; then
# use arch override if specified
pkg_name+="_${RAPIDS_ARCH}"
else
# otherwise use architecture of the host that's running the upload command
pkg_name+="_$(arch)"
fi
fi

# for cpp and python package types, its a tarball, append .tar.gz and prepend project name
# for cpp and python package types, it's a tarball, append .tar.gz and prepend project name
pkg_name="${repo_name}_${pkg_name}.tar.gz"

echo -n "${pkg_name}"