astropy / halotools

Python package for studying large scale structure, cosmology, and galaxy evolution using N-body simulations and halo models
http://halotools.rtfd.org
BSD 3-Clause "New" or "Revised" License
104 stars 65 forks source link

Adding GitHub Action to produce Python Wheels for Linux and Mac #1017

Closed EiffL closed 3 years ago

EiffL commented 3 years ago

This short PR adds a GitHub action that will automatically trigger the build of python wheels for all versions of python above 3.6 for both Mac (intel) and linux architectures. It uses the excellent https://cibuildwheel.readthedocs.io/ tool that makes all of this very simple.

For maintainers, here are the steps to follow upon a new code release:

This is in addition to uploading the normal source distribution. Eventually the entire process can be automatized if you create a pypi key so that the action can directly push to pypi.

After that, a user can trivially install halotools by:

$ pip install halotools

and they wont have to recompile anything, this will automatically grab the appropriate python wheel.

If you want to test it out before merging, I've run the action on my fork:

Annnnd to demonstrate how cool this is: https://colab.research.google.com/drive/1_KjhW8zV7EGDyIzeIHC9tZiZpffs69G7?usp=sharing

aphearin commented 3 years ago

Really nice work getting this going @EiffL! I can confirm that running tests locally on my mac works as expected.