From 7dd1e283cb1fabd2edc325948a909bb5587e8fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Fri, 7 Jun 2024 19:16:40 +0200 Subject: [PATCH] Run strip --strip-debug manually after creating wheel --- ci/scripts/python_wheel_manylinux_build.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/ci/scripts/python_wheel_manylinux_build.sh b/ci/scripts/python_wheel_manylinux_build.sh index 44a11d015b6f8..4c302ad4736a0 100755 --- a/ci/scripts/python_wheel_manylinux_build.sh +++ b/ci/scripts/python_wheel_manylinux_build.sh @@ -160,6 +160,26 @@ export CMAKE_PREFIX_PATH=/tmp/arrow-dist pushd /arrow/python python setup.py bdist_wheel +echo "=== Strip symbols from wheel ===" +mkdir dist/temp-fix-wheel +mv dist/pyarrow-*.whl dist/temp-fix-wheel + +pushd dist/temp-fix-wheel +wheel_name=$(ls pyarrow-*.whl) +# Unzip and remove old wheel +unzip $wheel_name +rm $wheel_name +for filename in $(ls pyarrow/*.so pyarrow/*.so.*); do + echo "Stripping debug symbols from: $filename"; + strip --strip-debug $filename +done +# Zip wheel again after stripping symbols +zip -r $wheel_name . +mv $wheel_name .. +popd + +rm -rf dist/temp-fix-wheel + echo "=== (${PYTHON_VERSION}) Tag the wheel with manylinux${MANYLINUX_VERSION} ===" -auditwheel repair --strip -L . dist/pyarrow-*.whl -w repaired_wheels +auditwheel repair -L . dist/pyarrow-*.whl -w repaired_wheels popd