InsightSoftwareConsortium / ITKPythonPackage

A setup script to generate ITK Python Wheels
https://itkpythonpackage.readthedocs.io
Apache License 2.0
63 stars 21 forks source link

BUG: Auditwheel targets multiple wheels #247

Open tbirdso opened 1 year ago

tbirdso commented 1 year ago

Current behavior

The Linux wheel repair mechanism with auditwheel attempts to repair preexisting wheel artifacts. This can result in an error being thrown or in previous wheels erroneously being removed.

From https://github.com/tbirdso/ITKBSplineGradient/actions/runs/3824246225/jobs/6506214609:

+ for whl in 'dist/*linux*$(uname -m).whl'
+ /opt/python/cp37-cp37m/bin/python /ITKPythonPackage/scripts/internal/auditwheel_whitelist_monkeypatch.py repair dist/itk_bsplinegradient-0.3.0-cp37-cp37m-linux_x86_64.whl -w /work/dist/ --whitelist ''
INFO:auditwheel.main_repair:Repairing itk_bsplinegradient-0.3.0-cp37-cp37m-linux_x86_64.whl
INFO:auditwheel.wheeltools:Previous filename tags: linux_x86_64
INFO:auditwheel.wheeltools:New filename tags: manylinux_2_17_x86_64, manylinux2014_x86_64
INFO:auditwheel.wheeltools:Previous WHEEL info tags: cp37-cp37m-linux_x86_64
INFO:auditwheel.wheeltools:New WHEEL info tags: cp37-cp37m-manylinux_2_17_x86_64, cp37-cp37m-manylinux2014_x86_64
INFO:auditwheel.main_repair:
Fixed-up wheel written to /work/dist/itk_bsplinegradient-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
+ rm dist/itk_bsplinegradient-0.3.0-cp37-cp37m-linux_x86_64.whl
+ for whl in 'dist/*linux*$(uname -m).whl'
+ /opt/python/cp37-cp37m/bin/python /ITKPythonPackage/scripts/internal/auditwheel_whitelist_monkeypatch.py repair dist/itk_bsplinegradient-0.3.0-cp37-cp37m-manylinux_2_28_x86_64.whl -w /work/dist/ --whitelist ''
INFO:auditwheel.main_repair:Repairing itk_bsplinegradient-0.3.0-cp37-cp37m-manylinux_2_28_x86_64.whl
usage: auditwheel_whitelist_monkeypatch.py [-h] [-V] [-v] command ...
auditwheel_whitelist_monkeypatch.py: error: cannot repair "dist/itk_bsplinegradient-0.3.0-cp37-cp37m-manylinux_2_28_x86_64.whl" to "manylinux2014_x86_64" ABI because of the presence of too-recent versioned symbols. You'll need to compile the wheel on an older toolchain.

Requested Behavior

Auditwheel should be directed to repair only the expected wheel output from the currently running script. The wheel filename to use should be constained based on Python version, manylinux version, and target architecture.