From 12ec30b7cda53895510a2efb3349d6c25602a273 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 29 Nov 2023 12:40:41 -0800 Subject: [PATCH] Retag wheels to be `cpXY` (#644) Fixes https://github.com/rapidsai/cucim/issues/641 After building the wheels, this... * Creates the tag string from `cp` (CPython) and the `python`'s version * Uses the tag string to replace the `python_tag` and `abi_tag` * Removes the previous wheels while performing this conversion * Hands them to `auditwheel` for final steps Authors: - https://github.com/jakirkham Approvers: - Gregory Lee (https://github.com/grlee77) - Vyas Ramasubramani (https://github.com/vyasr) - Bradley Dice (https://github.com/bdice) - Ray Douglass (https://github.com/raydouglass) URL: https://github.com/rapidsai/cucim/pull/644 --- ci/build_wheel.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index a39ebf502..60355e050 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -45,6 +45,14 @@ cd "${package_dir}" python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check +# Because we built the library with the run script and manually copied the shared pybind11 +# library, the subsequent py_project.toml wheel build was as a pure Python package and results in +# tags that incorrectly indicate it is a universal wheel. To fix this, we need to modify the wheel +# to have CPython ABI and Python tags matching the version of Python that the Python bindings were +# built with. +WHEEL_PYTHON_TAG=cp$(echo ${RAPIDS_PY_VERSION} | sed 's/\.//g') +python -m wheel tags --remove --python-tag="${WHEEL_PYTHON_TAG}" --abi-tag="${WHEEL_PYTHON_TAG}" dist/* + mkdir -p final_dist python -m auditwheel repair -w final_dist dist/*