From 61280efc8c021ef037cbe2ca844f7bb7e83a3c4b Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Wed, 29 Apr 2026 15:46:23 -0400 Subject: [PATCH 1/3] refactor(rapids-artifact-name): add explicit `--arch` flag to override `$(arch)` --- tools/rapids-artifact-name | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/tools/rapids-artifact-name b/tools/rapids-artifact-name index 755c046..cb47d0d 100755 --- a/tools/rapids-artifact-name +++ b/tools/rapids-artifact-name @@ -13,13 +13,16 @@ # (python packages only; mutually exclusive with --stable and --pure) # --stable: set `cpython_version` equal to `abi3` (python packages only) # --pure: set `cpython_version` equal to `pure` (python packages only) +# --arch : override arch field set -euo pipefail export RAPIDS_SCRIPT_NAME="rapids-artifact-name" +arch_flag=0 cuda_flag=0 py_flag=0 stable_flag=0 pure_flag=0 +arch_value="" cuda_version="" py_version="" pkg_type="" @@ -28,6 +31,17 @@ repo_name="" while [[ $# -gt 0 ]]; do case $1 in + --arch) + arch_flag=1 + shift + if [[ $# -gt 0 && "$1" != -* ]]; then + arch_value="$1" + shift + else + rapids-echo-stderr "--arch requires a value" + exit 1 + fi + ;; --cuda) cuda_flag=1 shift @@ -53,7 +67,7 @@ while [[ $# -gt 0 ]]; do shift ;; -*) - rapids-echo-stderr "Unknown flag: $1. Supported flags: --cuda, --py, --stable, --pure" + rapids-echo-stderr "Unknown flag: $1. Supported flags: --arch, --cuda, --py, --stable, --pure" exit 1 ;; *) @@ -148,12 +162,11 @@ else cpython_version="cp${py_version//./}" fi -raw_arch="$(arch)" -case "${raw_arch}" in - x86_64) arch_field="amd64" ;; - aarch64) arch_field="arm64" ;; - *) arch_field="${raw_arch}" ;; -esac +if (( arch_flag == 1 )); then + arch_field="${arch_value}" +else + arch_field="$(arch)" +fi artifact_name="${repo_name}_${pkg_type_part}_${pkg_lang}_${pkg_name}" if (( pure_flag == 0 || cuda_flag == 1 )); then From 207ee5c82b998edd7ba730f7fd66fe8de861f981 Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Wed, 29 Apr 2026 15:47:56 -0400 Subject: [PATCH 2/3] Revert "fix(rapids-artifact-name): handling for "true" pure artifacts vs. cuda-dependent pure artifacts (#254)" This reverts commit 2a51afa3924fbe8c3c75744a476f71a47baef799. --- tools/rapids-artifact-name | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tools/rapids-artifact-name b/tools/rapids-artifact-name index cb47d0d..0a8265f 100755 --- a/tools/rapids-artifact-name +++ b/tools/rapids-artifact-name @@ -1,8 +1,7 @@ #!/bin/bash # Generates a standardized artifact name following the template: -# python: {repo}_{pkg_type}_{pkg_lang}_{pkg_name}_{arch}_{cpython_version}[_{cuda_version}] -# cpp: {repo}_{pkg_type}_{pkg_lang}_{pkg_name}_{arch}[_{cuda_version}] -# pure (no --cuda): {repo}_{pkg_type}_{pkg_lang}_{pkg_name}_{cpython_version} +# python: {repo}_{pkg_type}_{pkg_lang}_{pkg_name}_{arch}_{cpython_version}[_{cuda_version}] +# cpp: {repo}_{pkg_type}_{pkg_lang}_{pkg_name}_{arch}[_{cuda_version}] # Positional Arguments: # 1) package type (conda_cpp, conda_python, wheel_cpp, wheel_python) # 2) package name (e.g. librmm, rmm) @@ -168,13 +167,7 @@ else arch_field="$(arch)" fi -artifact_name="${repo_name}_${pkg_type_part}_${pkg_lang}_${pkg_name}" -if (( pure_flag == 0 || cuda_flag == 1 )); then -# we have two categories of "pure" artifacts -# "true" purity -- independent of architecture, Python version, or CUDA version -# "python" purity -- independent of Python version, but dependent on CUDA version (and therefore on architecture) - artifact_name+="_${arch_field}" -fi +artifact_name="${repo_name}_${pkg_type_part}_${pkg_lang}_${pkg_name}_${arch_field}" if [[ -n "${cpython_version}" ]]; then artifact_name+="_${cpython_version}" fi From 15d0f514f55327373af5543021ee0007c8dc2bd1 Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Wed, 6 May 2026 11:39:57 -0400 Subject: [PATCH 3/3] chore: add better description of arch flag --- tools/rapids-artifact-name | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/rapids-artifact-name b/tools/rapids-artifact-name index 0a8265f..57ed901 100755 --- a/tools/rapids-artifact-name +++ b/tools/rapids-artifact-name @@ -12,7 +12,7 @@ # (python packages only; mutually exclusive with --stable and --pure) # --stable: set `cpython_version` equal to `abi3` (python packages only) # --pure: set `cpython_version` equal to `pure` (python packages only) -# --arch : override arch field +# --arch : override arch field (default is the output of $(arch)) set -euo pipefail export RAPIDS_SCRIPT_NAME="rapids-artifact-name"