meson-python tightly integrates with Meson to produce Python
wheels and sdists. Therefore, correct operation depends on
functionality implemented by Meson.
meson-python strives to
maintain compatibility with as old as possible Meson releases.
However, some functionality is available only with more recent Meson
Meson is 0.63.3 is the minimum required version.
Meson 1.1.0 or later is required to support the
exclude_directoriesarguments to Meson
install_subdirand similar installation functions. On older Meson versions, these arguments have no effect.
Python 3.12 Meson 1.2.3 and later do not rely anymore on
distutilsand is required to support support Python 3.12 and later where the
distutilsmodules has been removed from the Python standard library.
meson-pythondepends on this versions of Meson, when installed on Python 3.12, thus packages using
meson-pythondo not need to add an explicit version requirement.
Meson 1.3.0 or later is required for compiling extension modules targeting the Python limited API.
Build front-ends by default build packages in an isolated Python
environment where build dependencies are installed. Most often, unless
a package or its build dependencies declare explicitly a version
constraint, this results in the most recent version of the build
dependencies to be installed. However, if a package uses
functionalities implemented only in combination with a specific Meson
version, it is recommended to explicitly declare a version
pyproject.toml. For example:
[build-system] build-backend = 'mesonpy' requires = [ 'meson-python', 'meson >= 1.1.0', ]