From 19713d9089ed2366566dbff85ed445756b975617 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 4 Mar 2024 11:50:27 -0600 Subject: [PATCH 1/3] Add support for pure Python wheels. --- tools/rapids-package-name | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/tools/rapids-package-name b/tools/rapids-package-name index 668d407..ea9db63 100755 --- a/tools/rapids-package-name +++ b/tools/rapids-package-name @@ -15,19 +15,26 @@ fi pkg_type="$1" append_cuda=0 -append_pyver=0 append_wheelname=0 +append_pyver=0 +append_arch=0 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_wheelname=1 append_pyver=1 + append_arch=1 + ;; + wheel_python_pure) append_wheelname=1 ;; *) @@ -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//./}" 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}" From a9a549ef408872a11ccd594294227d663ee1dd0a Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 4 Mar 2024 12:31:53 -0600 Subject: [PATCH 2/3] Control pure wheel name generation with RAPIDS_PY_WHEEL_PURE=1. --- tools/rapids-package-name | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/rapids-package-name b/tools/rapids-package-name index ea9db63..ba2ca82 100755 --- a/tools/rapids-package-name +++ b/tools/rapids-package-name @@ -31,11 +31,11 @@ case "${pkg_type}" in ;; wheel_python) append_wheelname=1 - append_pyver=1 - append_arch=1 - ;; - wheel_python_pure) - append_wheelname=1 + # Pure wheels do not need a pyver or arch + if [[ ! -v RAPIDS_PY_WHEEL_PURE ]] || [[ "${RAPIDS_PY_WHEEL_PURE}" != "1" ]]; then + append_pyver=1 + append_arch=1 + fi ;; *) rapids-echo-stderr "Nonstandard package type '${pkg_type}'" From 2be6b2cd15f95f1ce385a210b32044382af14e26 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 4 Mar 2024 12:32:02 -0600 Subject: [PATCH 3/3] Add "py". --- tools/rapids-package-name | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/rapids-package-name b/tools/rapids-package-name index ba2ca82..9899e0c 100755 --- a/tools/rapids-package-name +++ b/tools/rapids-package-name @@ -57,7 +57,7 @@ fi # 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 (except pure wheels), append the arch