Skip to content

Commit f26c942

Browse files
committed
BUG: auditwheel updates for the metawheel
Remove non-manylinux wheels, which recent auditwheel versions are not doing after the repair. Manually update the `itk` metapackage wheel tag and filename since scikit-build and auditwheel are currently not doing it.
1 parent ba150d7 commit f26c942

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

scripts/internal/manylinux-build-wheels.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,26 @@ for PYBIN in "${PYBINARIES[@]}"; do
173173
done
174174

175175
if test "${ARCH}" == "x64"; then
176-
sudo /opt/python/cp39-cp39/bin/pip3 install auditwheel wheel
176+
sudo /opt/python/cp311-cp311/bin/pip3 install auditwheel wheel
177177
# This step will fixup the wheel switching from 'linux' to 'manylinux<version>' tag
178178
for whl in dist/itk_*linux_*.whl; do
179-
/opt/python/cp39-cp39/bin/auditwheel repair --plat manylinux${MANYLINUX_VERSION}_x86_64 ${whl} -w /work/dist/
179+
/opt/python/cp311-cp311/bin/auditwheel repair --plat manylinux${MANYLINUX_VERSION}_x86_64 ${whl} -w /work/dist/
180180
done
181+
# auditwheel does not process this "metawheel" correctly since it does not
182+
# have any native SO's.
183+
mkdir -p metawheel-dist
184+
for whl in dist/itk-*linux_*.whl; do
185+
/opt/python/cp311-cp311/bin/wheel unpack --dest metawheel ${whl}
186+
manylinux_version=manylinux${MANYLINUX_VERSION}
187+
new_tag=$(basename ${whl/linux/${manylinux_version}} .whl)
188+
sed -i "s/Tag: .*/Tag: ${new_tag}/" metawheel/itk-*/itk*.dist-info/WHEEL
189+
/opt/python/cp311-cp311/bin/wheel pack --dest metawheel-dist metawheel/itk-*
190+
mv metawheel-dist/*.whl dist/${new_tag}.whl
191+
rm -rf metawheel
192+
done
193+
rm -rf metawheel-dist
194+
rm dist/itk-*-linux_*.whl
195+
rm dist/itk_*-linux_*.whl
181196
else
182197
for whl in dist/itk_*$(uname -m).whl; do
183198
auditwheel repair ${whl} -w /work/dist/

0 commit comments

Comments
 (0)