aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorambrosin <ambrosin@google.com>2023-07-14 04:34:43 -0700
committerCopybara-Service <copybara-worker@google.com>2023-07-14 04:37:29 -0700
commitc9295808fe1078a0320ba7a0daf8aad8890183ab (patch)
treeef1fbb9001979f799211cb507baac0c831f28bc7 /python
parent36095fe2d205239c004072ca44f64889e2c9128d (diff)
downloadtink-c9295808fe1078a0320ba7a0daf8aad8890183ab.tar.gz
Use the correct wheel name when testing on ARM64
PiperOrigin-RevId: 548089740
Diffstat (limited to 'python')
-rwxr-xr-xpython/tools/distribution/test_linux_binary_wheels.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/python/tools/distribution/test_linux_binary_wheels.sh b/python/tools/distribution/test_linux_binary_wheels.sh
index 6e1e6df2f..bb9f45445 100755
--- a/python/tools/distribution/test_linux_binary_wheels.sh
+++ b/python/tools/distribution/test_linux_binary_wheels.sh
@@ -30,11 +30,17 @@ PYTHON_VERSIONS["3.9"]="cp39-cp39"
PYTHON_VERSIONS["3.10"]="cp310-cp310"
readonly -A PYTHON_VERSIONS
+readonly ARCH="$(uname -m)"
+
# This is a compressed tag set as specified at
# https://peps.python.org/pep-0425/#compressed-tag-sets
#
# Keep in sync with the output of the auditwheel tool.
-readonly PLATFORM_TAG_SET="manylinux_2_17_x86_64.manylinux2014_x86_64"
+PLATFORM_TAG_SET="manylinux_2_17_x86_64.manylinux2014_x86_64"
+if [[ "${ARCH}" == "aarch64" || "${ARCH}" == "arm64" ]]; then
+ PLATFORM_TAG_SET="manylinux_2_17_aarch64.manylinux2014_aarch64"
+fi
+readonly PLATFORM_TAG_SET
export TINK_PYTHON_ROOT_PATH="${PWD}"
@@ -50,8 +56,8 @@ for v in "${!PYTHON_VERSIONS[@]}"; do
(
# Executing in a subshell to make the PATH modification temporary.
export PATH="${PATH}:/opt/python/${PYTHON_VERSIONS[$v]}/bin"
-
- pip3 install release/*-"${PYTHON_VERSIONS[$v]}"-"${PLATFORM_TAG_SET}".whl
+ python3 -m pip install \
+ release/*-"${PYTHON_VERSIONS[$v]}"-"${PLATFORM_TAG_SET}".whl
find tink/ -not -path "*cc/pybind*" -type f -name "*_test.py" -print0 \
| xargs -0 -n1 python3
)