Draft: Build sdist and wheels on Github Actions (+ later upload to PyPI when new tags)
This is an attempt to build sdist and wheels on Github Actions. The big advantage would be that wheels on all mainstream platforms would be available for users few minutes after a new tag is pushed to the repo (completely automatically).
For now, wheels are built here https://github.com/paugier/mercurial-devel/actions for different implementations (Cpython and PyPy) and versions of Python (3.9 to 3.12) and
- linux x86_64
- windows x86_64
- macos x86_64
- macos arm64
linux aarch64 should also works (I should enable this build to try).
I think this already shows the potential of the method.
However, currently, it is quite broken because:
-
I created the git repo https://github.com/paugier/mercurial-devel with hg-git and it did not push the tags. I know that if the repo is a mirror handled directly from https://foss.heptapod.net/mercurial/mercurial-devel, the tags are correctly set (see for example https://github.com/fluiddyn/fluidsim/tags which is a mirror of https://foss.heptapod.net/fluiddyn/fluidsim). @gracinet might know how I could manually push the tags on Github?
-
Much worst, the sdist is broken with missing files since there is no MANIFEST.in file. It is is usually produced with hg from the repository (see https://foss.heptapod.net/mercurial/mercurial-devel/-/blob/branch/default/Makefile?ref_type=heads#L125). I don't know how this should be fixed (but I haven't think too much about it and it should not be so difficult). Maybe dynamically create MANIFEST.in with git (which has the information) or/and modify
.gitattribute
.
Also I didn't check the wheels. They should somehow be tested during the CI on Github Actions.
Moreover, I don't know if there is a way to forbid a merge on Heptapod that would break the CI on GA.
Finally, there is also the issue with Heptapod related to the fact that mercurial-devel is a pure mercurial repo, so that git mirroring should not yet be supported. However, this is a planed feature for Heptapod (heptapod/heptapod#355).
Note also that this is actually orthogonal to the changes in setup.py related to distutils being removed from Python 3.13.