Producing Mercurial wheels from Github Actions + modernize build process
PIERRE AUGIER
pierre.augier at univ-grenoble-alpes.fr
Fri Sep 27 07:14:56 UTC 2024
Hello,
I tried to see if Mercurial wheels could be produced on Github Actions.
https://github.com/paugier/mercurial-devel/blob/refs/heads/wheels-with-github-actions/.github/workflows/wheels.yml
Nothing works because simple standard commands do not work for Mercurial.
https://github.com/paugier/mercurial-devel/actions/runs/11064702442
Even producing the sdist fails:
Run python -m build --sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
- setuptools
- wheel
* Getting build dependencies for sdist...
/!\
/!\ Could not determine the Mercurial version
/!\ You need to build a local version first
/!\ Run `make local` and try again
/!\
Run `make local` first to get a working local version
And same error for wheels:
python -m pip wheel /project --wheel-dir=/tmp/cibuildwheel/built_wheel --no-deps
Processing /project
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
/!\
/!\ Could not determine the Mercurial version
/!\ You need to build a local version first
/!\ Run `make local` and try again
/!\
Run `make local` first to get a working local version
[end of output]
I had a look at the Makefile and setup.py. It seems that they contain a lot of legacy code and that a simplification and modernization would be welcome. For example, setup.py should never be called directly (and it is even better if we can avoid it).
I guess I don't understand why setup.py has to be so complex and I suspect that it would much simpler with another build system, for example Meson (used by Numpy, Scipy and many other projects https://mesonbuild.com/Users.html).
I have a bit of experience with using Meson so I can help if one wants to give it a try for Mercurial build.
Regarding Rust, if I understand correctly, it is now a build option leading to two different Mercurial wheels. Meson-python can also have build options, but this is not good practice for the PyPA. Did you think about having the Rust extensions (and binaries) in another PyPI package (like mercurial-rust)?
Pierre
--
Pierre Augier - CR CNRS http://www.legi.grenoble-inp.fr
LEGI (UMR 5519) Laboratoire des Ecoulements Geophysiques et Industriels
BP53, 38041 Grenoble Cedex, France tel:+33.4.56.52.86.16
More information about the Mercurial
mailing list