|
| 1 | +.. SPDX-FileCopyrightText: 2023 The meson-python developers |
| 2 | +.. |
| 3 | +.. SPDX-License-Identifier: MIT |
| 4 | +
|
| 5 | +.. _meson-compatibility: |
| 6 | + |
| 7 | +******************* |
| 8 | +Meson compatibility |
| 9 | +******************* |
| 10 | + |
| 11 | +``meson-python`` tightly integrates with Meson to produce Python |
| 12 | +wheels and sdists. Therefore, correct operation depends on |
| 13 | +functionality implemented by Meson. ``meson-python`` strives to |
| 14 | +maintain compatibility with as old as possible Meson releases. |
| 15 | +However, some functionality is available only with more recent Meson |
| 16 | +versions. |
| 17 | + |
| 18 | +.. option:: 0.63.3 |
| 19 | + |
| 20 | + Meson is 0.63.3 is the minimum required version. |
| 21 | + |
| 22 | +.. option:: 1.1.0 |
| 23 | + |
| 24 | + Meson 1.1.0 or later is required to support the ``exclude_files`` |
| 25 | + and ``exclude_directories`` arguments to Meson ``install_subdir`` |
| 26 | + and similar installation functions. On older Meson versions, these |
| 27 | + arguments have no effect. |
| 28 | + |
| 29 | +.. option:: 1.3.0 |
| 30 | + |
| 31 | + Meson 1.3.0 or later is required for compiling extension modules |
| 32 | + targeting the Python limited API. |
| 33 | + |
| 34 | +Build front-ends by default build packages in an isolated Python |
| 35 | +environment where build dependencies are installed. Most often, unless |
| 36 | +a package or its build dependencies declare explicitly a version |
| 37 | +constraint, this results in the most recent version of the build |
| 38 | +dependencies to be installed. However, if a package uses |
| 39 | +functionalities implemented only in combination with a specific Meson |
| 40 | +version, it is recommended to explicitly declare a version |
| 41 | +requirement in ``pyproject.toml``. For example: |
| 42 | + |
| 43 | +.. code-block:: toml |
| 44 | +
|
| 45 | + [build-system] |
| 46 | + build-backend = 'mesonpy' |
| 47 | + requires = [ |
| 48 | + 'meson-python', |
| 49 | + 'meson >= 1.1.0', |
| 50 | + ] |
0 commit comments