mapbox / rio-color

Color correction plugin for rasterio
MIT License
131 stars 24 forks source link

Example wheel builds using cibuildwheel #66

Closed kylebarron closed 3 years ago

kylebarron commented 4 years ago

:wave:

In rio-tiler we're considering adding a dependency on rio-color and I saw #65. I've had a lot of success using the https://github.com/joerick/cibuildwheel project, which uses a CI platform of your choice to simplify the wheel-building process (especially for simple wheels that don't have any complex dependencies). I thought it might help to move the conversation forward to share a working example. This example uses Github Actions but it should be possible to use Travis CI instead if you wish.

This ran on my fork and created the following set of wheels: artifact.zip. (I'm not totally sure why it didn't build wheels for 3.9; a similar script did build 3.9 wheels for me).

sgillies commented 4 years ago

@kylebarron ooh, I'm very interested in this. I've been using https://github.com/matthew-brett/multibuild for other projects but have been getting curious about cibuildwheel. Will review soon.

kylebarron commented 4 years ago

I hadn't been familiar with multibuild, but glancing at it, it looks like cibuildwheel might be simpler.

The cibuildwheel docs note that building Windows Python 2.7 wheels on Travis CI isn't supported; do you have plans to deprecate 2.7? There are also fuller Travis CI examples here and here.

sgillies commented 3 years ago

The Mapbox security team won't allow me to use GitHub Actions here, and I am myself concerned about using 3rd party actions, but maybe I can adapt this for AppVeyor.

kylebarron commented 3 years ago

There's an example with AppVeyor here / here. I think cibuildwheel itself is pretty CI-agnostic, so it should be straightforward to integrate it with any CI.

sgillies commented 3 years ago

@kylebarron I'm having success with #70 . Who knew there were so many flavors of wheels? :joy:

I'm going to upload a few 1.0.1dev wheels to PyPI (which pip will ignore by default without --pre or rio-color==1.0.1dev) and will report back in #65 when they are ready for testing.

kylebarron commented 3 years ago

Who knew there were so many flavors of wheels

2 cpu arch (x86_64, i686), 3 OS, 4-5 Python versions, CPython + PyPy... can really add up!