Skip to content

Commit

Permalink
Run strip --strip-debug manually after creating wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
raulcd committed Jun 7, 2024
1 parent 734c266 commit 7dd1e28
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion ci/scripts/python_wheel_manylinux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7dd1e28

Please sign in to comment.