commit:     a11fd42c0814e166621b130111f878daf38cc980
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  9 18:11:22 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov  9 18:13:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a11fd42c

dev-build/meson: rebase 9999 patch

Pull from Chewi's PR.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../meson/files/meson-1.10.0-python-path.patch     | 39 ++++++++++++++++++++++
 dev-build/meson/meson-9999.ebuild                  |  2 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/dev-build/meson/files/meson-1.10.0-python-path.patch 
b/dev-build/meson/files/meson-1.10.0-python-path.patch
new file mode 100644
index 000000000000..3de84046e05d
--- /dev/null
+++ b/dev-build/meson/files/meson-1.10.0-python-path.patch
@@ -0,0 +1,39 @@
+From fbe4477ac8937253fe027486a28700f4f035b42b Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Sat, 12 Aug 2023 09:56:44 +0100
+Subject: [PATCH 2/2] python module: Respect PATH when python is not given in
+ machine file
+
+We should only fall back to the Python interpreter running Meson itself
+if `python3` is not found in the PATH.
+
+A couple of tests relied on the old behaviour. Under Arch/PyPy, the
+PATH's `python3` does not point to PyPy. Unfortunately, other
+Python-based tools like g-ir-scanner are installed with a shebang of
+`/usr/bin/env python3` on Arch, so adjusting the PATH to point to a
+different Python breaks such tools. We must therefore specify `python`
+in a machine file instead.
+
+We also have to now exclude "test cases/frameworks/1 boost" on Arch/PyPy
+because it cannot work against PyPy. It was previously using CPython,
+despite Meson itself running under PyPy, but the machine file has
+changed that.
+---
+ mesonbuild/modules/python.py              |  4 +++-
+ 6 files changed, 18 insertions(+), 9 deletions(-)
+
+diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
+index 9c1ad86cb170..ad1260ca5015 100644
+--- a/mesonbuild/modules/python.py
++++ b/mesonbuild/modules/python.py
+@@ -460,7 +460,9 @@ def _find_installation_impl(self, state: 'ModuleState', 
display_name: str, name_
+         build_config = 
self.interpreter.environment.coredata.optstore.get_value_for(OptionKey('python.build_config'))
+ 
+         if not name_or_path:
+-            python = PythonExternalProgram('python3', 
mesonlib.python_command, build_config_path=build_config)
++            python = PythonExternalProgram('python3', 
build_config_path=build_config)
++            if not python.found():
++                python = PythonExternalProgram('python3', 
mesonlib.python_command, build_config_path=build_config)
+         else:
+             tmp_python = ExternalProgram.from_entry(display_name, 
name_or_path)
+             python = PythonExternalProgram(display_name, ext_prog=tmp_python, 
build_config_path=build_config)

diff --git a/dev-build/meson/meson-9999.ebuild 
b/dev-build/meson/meson-9999.ebuild
index 3c95d82cdae5..e0ca644baeb2 100644
--- a/dev-build/meson/meson-9999.ebuild
+++ b/dev-build/meson/meson-9999.ebuild
@@ -102,7 +102,7 @@ RDEPEND="
 "
 
 PATCHES=(
-       "${FILESDIR}"/${PN}-1.2.1-python-path.patch
+       "${FILESDIR}"/${PN}-1.10.0-python-path.patch
 )
 
 src_unpack() {

Reply via email to