Skip to content

Commit 4c56008

Browse files
committed
Merge branch 'release'
2 parents c9c8130 + d7148c1 commit 4c56008

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

scripts/internal/manylinux-build-wheels.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,35 @@ for PYBIN in "${PYBINARIES[@]}"; do
172172

173173
done
174174

175+
sudo /opt/python/cp311-cp311/bin/pip3 install auditwheel wheel
176+
175177
if test "${ARCH}" == "x64"; then
176-
sudo /opt/python/cp39-cp39/bin/pip3 install auditwheel wheel
177178
# This step will fixup the wheel switching from 'linux' to 'manylinux<version>' tag
178179
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/
180+
/opt/python/cp311-cp311/bin/auditwheel repair --plat manylinux${MANYLINUX_VERSION}_x86_64 ${whl} -w /work/dist/
180181
done
181182
else
182183
for whl in dist/itk_*$(uname -m).whl; do
183-
auditwheel repair ${whl} -w /work/dist/
184+
/opt/python/cp311-cp311/bin/auditwheel repair ${whl} -w /work/dist/
184185
done
185186
fi
186187

188+
# auditwheel does not process this "metawheel" correctly since it does not
189+
# have any native SO's.
190+
mkdir -p metawheel-dist
191+
for whl in dist/itk-*linux_*.whl; do
192+
/opt/python/cp311-cp311/bin/wheel unpack --dest metawheel ${whl}
193+
manylinux_version=manylinux${MANYLINUX_VERSION}
194+
new_tag=$(basename ${whl/linux/${manylinux_version}} .whl)
195+
sed -i "s/Tag: .*/Tag: ${new_tag}/" metawheel/itk-*/itk*.dist-info/WHEEL
196+
/opt/python/cp311-cp311/bin/wheel pack --dest metawheel-dist metawheel/itk-*
197+
mv metawheel-dist/*.whl dist/${new_tag}.whl
198+
rm -rf metawheel
199+
done
200+
rm -rf metawheel-dist
201+
rm dist/itk-*-linux_*.whl
202+
rm dist/itk_*-linux_*.whl
203+
187204
# Install packages and test
188205
for PYBIN in "${PYBINARIES[@]}"; do
189206
${PYBIN}/pip install --user numpy

0 commit comments

Comments
 (0)