python-flint icon indicating copy to clipboard operation
python-flint copied to clipboard

Wheel for `aarch64-linux`

Open danielbarter opened this issue 2 years ago • 7 comments

Hi there!

Really enjoying the latest releases of python-flint!

I noticed that since 0.5.0, there are wheels for aarch64-darwin and x86_64-linux which significantly reduce the burden of getting the python module installed.

Since most EC2 instances these days are aarch64, it would be pretty convenient to also have a aarch64-linux wheel! I am able to cross compile flint-3.0.0 for aarch64-linux so it seems like it should be possible! Let me know if there is anything I could do to help

danielbarter avatar Nov 15 '23 00:11 danielbarter

I think that conda provides binaries for aarch64: https://anaconda.org/conda-forge/python-flint

Otherwise do you know how we could build and test aarch64 wheels in CI?

oscarbenjamin avatar Nov 15 '23 11:11 oscarbenjamin

Otherwise do you know how we could build and test aarch64 wheels in CI?

My understanding is this is usually done using qemu, but this requires extra work to maintain, which isn't ideal. I wonder if GitHub has aarch-64 CI images 🤔

danielbarter avatar Nov 15 '23 15:11 danielbarter

I don't think GitHub Actions can use aarch64 natively: https://github.com/actions/runner-images/issues/5631

The OSX arm64 wheels are built in Cirrus CI which seems like it should work for aarch64 Linux: https://github.com/cirruslabs/cirrus-ci-docs/issues/218

oscarbenjamin avatar Nov 15 '23 16:11 oscarbenjamin

If anyone wants to have a go at this then they are welcome.

The first step is to make a complete build of python-flint and run the tests. I don't have any Linux on aarch64 machine that I could use to test this.

After that it's just a case of adding it to the CI matrix I guess but it probably takes a bit of fiddling around with cibuildwheel and the CI config.

My only concern here is about file sizes. Currently a release of python-flint takes up about 200MB on PyPI with the bigger part of that being the manylinux wheels. I expect that adding aarch64 would increase that to something like 300MB. If the releases get too large then we will hit the limits that PyPI has. There are for example limits on the total file size of all releases on a per project basis.

If we can find a way to make the wheels smaller then that would be good regardless. I wonder if we should be using strip or something: https://github.com/pypa/cibuildwheel/issues/331

oscarbenjamin avatar Nov 16 '23 12:11 oscarbenjamin

I'm not sure how to use them but it looks like GitHub Actions has Linux Arm runners now: https://github.blog/changelog/2024-06-03-actions-arm-based-linux-and-windows-runners-are-now-in-public-beta/

oscarbenjamin avatar Jun 19 '24 17:06 oscarbenjamin

If we can find a way to make the wheels smaller

We did make the wheels smaller so this is less of a concern but free-threading Python might double the size again...

oscarbenjamin avatar Jul 11 '24 12:07 oscarbenjamin

it looks like GitHub Actions has Linux Arm runners now:

I missed this part:

These runners are available to our customers on our GitHub Team and Enterprise Cloud plans. We expect to begin offering Arm runners for open source projects by the end of the year.

oscarbenjamin avatar Jul 11 '24 12:07 oscarbenjamin