Consider cibuildwheel for building wheels? · Issue #44027 · pandas-dev/pandas (original) (raw)

Disclaimer: I haven't been involved recently in maintaining our wheel building infrastructure, so I don't know how well it is working or not. But, I recently had a good experience with cibuildwheel with a relatively complex package, so therefore thought to bring it up.

Cibuildwheel (https://cibuildwheel.readthedocs.io/en/stable/) is a package helping to build wheels for all different platforms and architectures / python versions on your CI of choice (they support most of the common CI services). And if using GitHub Actions, you can build all wheels with a single CI service.

Scikit-learn started to use it last year (scikit-learn/scikit-learn#17921). You can see their github workflow as an example: https://github.com/scikit-learn/scikit-learn/blob/main/.github/workflows/wheels.yml (this single workflow config includes building all the wheels, building the sdist, and uploading them to the anaconda wheelhouse for nightly builds).
(cc @ogrisel @thomasjpfan in case you have feedback on how the switch worked out)

And it seems numpy also started considering this: numpy/numpy#20102
Another example mentioned in the dev meeting: https://github.com/googleapis/python-crc32c/blob/b1a8d14bf0a1b4f1faa0f9fdd4307e15699daeff/.github/workflows/python-publish.yml#L245

Some potential advantages:

cc @simonjayhawkins @lithomas1 since you are the ones mostly working on https://github.com/MacPython/pandas-wheels, it's of course mostly up to you to decide (and even if the end result might be better, every migration also has a cost).