cloudify-cosmo / wagon

Creates Wheel based archives to allow portable offline installation of Python packages and their dependencies
Apache License 2.0
108 stars 14 forks source link

Support `manylinux1` tag via auditwheel #52

Closed nir0s closed 7 years ago

nir0s commented 8 years ago

While we can declare that wagon only supports manylinux1 if the wheels in it are manylinux1, I think we should add the ability to convert linux_x64_86 to manylinux1 to make the job a bit more comfortable for the user.

Relevant links:

Since auditwheel requires Centos 5 (not older) to work (due to forward backward compat of glibc), we can verify that version of the distribution and only if it's Centos 5-, allow to run wagon repair which will recursively repair all wheels in the wagon and recreate the wagon.

To test creating a manylinux1 compat wheel, try

$ docker run -i -t -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /bin/bash
$ /opt/python/cp35-cp35m/bin/pip wheel flask
$ auditwheel repair MarkupSafe-0.23-cp35-cp35m-linux_x86_64.whl
...

Repairing MarkupSafe-0.23-cp35-cp35m-linux_x86_64.whl
Previous filename tags: linux_x86_64
New filename tags: manylinux1_x86_64
Previous WHEEL info tags: cp35-cp35m-linux_x86_64
New WHEEL info tags: cp35-cp35m-manylinux1_x86_64

Fixed-up wheel written to /wheelhouse/MarkupSafe-0.23-cp35-cp35m-manylinux1_x86_64.whl
...

WDYT?

nir0s commented 8 years ago

Btw, this also renders appending the distribution and release to the wagon file name redundant.

nirfuchs commented 8 years ago

@nir0s what if we don't convert linux_x86_64 to manylinux1 in this case. would it even work as expected?

nir0s commented 7 years ago

@nirfuchs it will probably not work due to cross-distro glibc compat issues.

nir0s commented 7 years ago

I supplied a repair command (corresponding with auditwheel's repair command) which will repair all linux wheels to manylinux1, repack it, and update the metadata. This obviously requires the same environment required by auditwheel so it can't just be run anywhere.

makslevental commented 1 year ago

@nir0s can you support passing args to auditwheel just as you do for pip? at minimum --plat?