Port from setuptools.build_meta to meson-python #392
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚀 Pull Request
Description
This is an initial attempt at #391. meson-python is usually adopted by large projects and may be overkill here, but cf-units is a good starting point to learn more about it. There is a Cython extension for udunits and an external project (antlr4) to manage (not yet implemented in this PR).
This change moves from setup.py and setup.cfg to Meson scripts and meson-python. Meson detects the udunits installation and adjusts the necessary paths accordingly. I'm also considering a fix for #313 with a Meson build option.
This PR is currently tested on Linux (with Debian 12 packages) only.
I added Spin to run the build and test commands. All tests are passing (and one skipped and one xfail).
$ spin build $ spin test
I installed all the other Python dependencies (listed in pyproject.toml) manually from pip. udunits is from the Debian repo.
What is missing:
__version__
, check whether/how mesonpy can generate the version string from meson.build