diff options
| author | Michał Górny <mgorny@gentoo.org> | 2024-01-13 19:05:12 +0100 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2024-01-13 21:12:24 +0100 |
| commit | 21b3f9ceef131258a721b1b29e52d0f9c4fd2ea4 (patch) | |
| tree | ffe2d2e7edbb3685eb4523fe77c702d905e60568 /dev-build/meson/files/meson-1.2.1-python-path.patch | |
| parent | db90c393875ad4f98de526b1e124fa7dd7dac04f (diff) | |
| download | gentoo-21b3f9ceef131258a721b1b29e52d0f9c4fd2ea4.tar.gz gentoo-21b3f9ceef131258a721b1b29e52d0f9c4fd2ea4.tar.bz2 gentoo-21b3f9ceef131258a721b1b29e52d0f9c4fd2ea4.zip | |
Move {dev-util → dev-build}/meson
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/34790
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-build/meson/files/meson-1.2.1-python-path.patch')
| -rw-r--r-- | dev-build/meson/files/meson-1.2.1-python-path.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-build/meson/files/meson-1.2.1-python-path.patch b/dev-build/meson/files/meson-1.2.1-python-path.patch new file mode 100644 index 000000000000..d6151881f83f --- /dev/null +++ b/dev-build/meson/files/meson-1.2.1-python-path.patch @@ -0,0 +1,26 @@ +From 2b33c94e6315e9a397dd48a58a5becb0df3b8aba Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +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. + +https://github.com/mesonbuild/meson/pull/12116 + +diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py +index 5654e4231..2b2395a9b 100644 +--- a/mesonbuild/modules/python.py ++++ b/mesonbuild/modules/python.py +@@ -381,7 +381,9 @@ class PythonModule(ExtensionModule): + + def _find_installation_impl(self, state: 'ModuleState', display_name: str, name_or_path: str, required: bool) -> MaybePythonProg: + if not name_or_path: +- python = PythonExternalProgram('python3', mesonlib.python_command) ++ python = PythonExternalProgram('python3') ++ if not python.found(): ++ python = PythonExternalProgram('python3', mesonlib.python_command) + else: + tmp_python = ExternalProgram.from_entry(display_name, name_or_path) + python = PythonExternalProgram(display_name, ext_prog=tmp_python) |
