From 9ace72db00ac4725d1ed5cc2d1f937145782aee7 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Mon, 28 Oct 2024 22:07:23 +0100 Subject: [PATCH 1/2] MAINT: bump minimum required Meson version to 0.64.0 Depending on 0.64.0 or later allows to use the pure argument when invoking the import('python').find_installation() Meson function, which makes for some nicer test and example code. Meson 0.64.0 was released on November 6th, 2022, just over a month after the current minimum supported version. --- .github/workflows/tests.yml | 3 --- docs/reference/meson-compatibility.rst | 4 ++-- pyproject.toml | 4 ++-- tests/packages/subdirs/meson.build | 19 +------------------ 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 42201ae96..d1dc8917a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -70,9 +70,6 @@ jobs: # Test with older supported Meson version. Meson up to # version 1.2.3 requires distutils, which has been removed # from the stdlib in Python 3.12, thus test with Pythn 3.11. - - os: ubuntu-latest - python: '3.11' - meson: '~=0.63.3' - os: ubuntu-latest python: '3.11' meson: '~=0.64.0' diff --git a/docs/reference/meson-compatibility.rst b/docs/reference/meson-compatibility.rst index 91c9708bc..3e1df1f10 100644 --- a/docs/reference/meson-compatibility.rst +++ b/docs/reference/meson-compatibility.rst @@ -15,9 +15,9 @@ maintain compatibility with as old as possible Meson releases. However, some functionality is available only with more recent Meson versions. -.. option:: 0.63.3 +.. option:: 0.64.0 - Meson is 0.63.3 is the minimum required version. + Meson is 0.64.0 is the minimum required version. .. option:: 1.1.0 diff --git a/pyproject.toml b/pyproject.toml index 6121d8888..09394db7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = 'mesonpy' backend-path = ['.'] requires = [ - 'meson >= 0.63.3; python_version < "3.12"', + 'meson >= 0.64.0; python_version < "3.12"', 'meson >= 1.2.3; python_version >= "3.12"', 'packaging >= 19.0', 'pyproject-metadata >= 0.8.0', @@ -34,7 +34,7 @@ classifiers = [ ] dependencies = [ - 'meson >= 0.63.3; python_version < "3.12"', + 'meson >= 0.64.0; python_version < "3.12"', 'meson >= 1.2.3; python_version >= "3.12"', 'packaging >= 19.0', 'pyproject-metadata >= 0.8.0', diff --git a/tests/packages/subdirs/meson.build b/tests/packages/subdirs/meson.build index fdfd68596..6c9cbd002 100644 --- a/tests/packages/subdirs/meson.build +++ b/tests/packages/subdirs/meson.build @@ -6,24 +6,7 @@ project('subdirs', version: '1.0.0') py = import('python').find_installation() -# in Meson >= 0.64 this could be replace with a single -# py.install_sources() with the 'preserve_path: true' argument. py.install_sources( 'subdirs/__init__.py', - subdir: 'subdirs', -) - -py.install_sources( - 'subdirs/a/__init__.py', - subdir: 'subdirs/a', -) - -py.install_sources( - 'subdirs/a/b/c.py', - subdir: 'subdirs/a/b', -) - -py.install_sources( - 'subdirs/b/c.py', - subdir: 'subdirs/b', + preserve_path: true, ) From aff5b306c46765cbc30251aa3e077c6ebbe598ec Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Mon, 28 Oct 2024 22:31:25 +0100 Subject: [PATCH 2/2] DOC: Meson 1.2.0 or later is required for --skip-subprojects support --- docs/reference/meson-compatibility.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/reference/meson-compatibility.rst b/docs/reference/meson-compatibility.rst index 3e1df1f10..743dde4a2 100644 --- a/docs/reference/meson-compatibility.rst +++ b/docs/reference/meson-compatibility.rst @@ -26,6 +26,12 @@ versions. and similar installation functions. On older Meson versions, these arguments have no effect. +.. option:: 1.2.0 + + Meson 1.2.0 or later is required to support the ``--skip-subprojects`` + option that can be passed to ``meson install`` to not include files + installed by some or all subprojects in the Python wheel. + .. option:: 1.2.3 Meson 1.2.3 or later is required to support Python 3.12 or later.