From 5727f4df92bc6ad3ce4d97afc785af73a487677e Mon Sep 17 00:00:00 2001 From: Gigon Bae Date: Tue, 20 Aug 2024 15:29:08 -0700 Subject: [PATCH] Add Windows wheel build for x86_64 platform Signed-off-by: Gigon Bae --- ci/build_wheel.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 4005c36d4..3474231d6 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -36,4 +36,26 @@ mkdir -p final_dist python -m auditwheel repair -w final_dist dist/* ls -1 final_dist | grep -vqz 'none' +# Build the wheel for Windows if the current platform is x86_64 (#763) +if [ "$(arch)" = "x86_64" ]; then + # Install the wheel package + pip install wheel + + # Create directories + mkdir -p unpacked converted_dist + # Unpack the wheel + wheel unpack final_dist/*_x86_64.whl -d unpacked + + # Delete unnecessary files/folder (.so files, .libs folder) + find unpacked -name '*.so*' -exec rm {} + + find unpacked -maxdepth 2 -type d -name '*.libs' -exec rm -r {} + + + # Pack the wheel again + wheel pack --dest-dir converted_dist unpacked/* + + # Change the platform tag to win_amd64 and store it in the final_dist folder + wheel tags --remove --python-tag=py3 --abi-tag=none --platform-tag=win_amd64 converted_dist/*_x86_64.whl + mv converted_dist/*-win_amd64.whl final_dist +fi + RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 final_dist