@@ -172,33 +172,35 @@ for PYBIN in "${PYBINARIES[@]}"; do
172172
173173done
174174
175+ sudo /opt/python/cp311-cp311/bin/pip3 install auditwheel wheel
176+
175177if test " ${ARCH} " == " x64" ; then
176- sudo /opt/python/cp311-cp311/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
179180 /opt/python/cp311-cp311/bin/auditwheel repair --plat manylinux${MANYLINUX_VERSION} _x86_64 ${whl} -w /work/dist/
180181 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
196182else
197183 for whl in dist/itk_* $( uname -m) .whl; do
198- auditwheel repair ${whl} -w /work/dist/
184+ /opt/python/cp311-cp311/bin/ auditwheel repair ${whl} -w /work/dist/
199185 done
200186fi
201187
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+
202204# Install packages and test
203205for PYBIN in " ${PYBINARIES[@]} " ; do
204206 ${PYBIN} /pip install --user numpy
0 commit comments