diff options
| author | Stéphane Cerveau <scerveau@igalia.com> | 2024-10-30 15:53:52 +0100 |
|---|---|---|
| committer | Xavier Claessens <xclaesse@gmail.com> | 2025-11-05 08:12:46 -0500 |
| commit | 2e0e2663b80950a4b4106160a0cc6db12a39a559 (patch) | |
| tree | fce4c1e4a82b97328ee66c2ae8dbbc5ba711ec85 /mesonbuild/interpreter/interpreterobjects.py | |
| parent | 60e3cc1c58c208c635bda23a7c62a92ae84cb6b6 (diff) | |
| download | meson-2e0e2663b80950a4b4106160a0cc6db12a39a559.tar.gz | |
ExternalProgram: add cmd_array to complete the offfering
In case of python and especially in the case of pyInstaller
where the python command is meson.exe runpython, it should
not be full path to be used but cmd_array.
Fixing #13834
Diffstat (limited to 'mesonbuild/interpreter/interpreterobjects.py')
| -rw-r--r-- | mesonbuild/interpreter/interpreterobjects.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index 1005fc273..3bdbcb93e 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -669,6 +669,17 @@ class _ExternalProgramHolder(ObjectHolder[_EXTPROG]): @noPosargs @noKwargs + @FeatureNew('ExternalProgram.cmd_array', '1.10.0') + @InterpreterObject.method('cmd_array') + def cmd_array_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> T.List[str]: + if not self.found(): + raise InterpreterException('Unable to get the path of a not-found external program') + cmd = self.held_object.get_command() + assert cmd is not None + return cmd + + @noPosargs + @noKwargs @FeatureNew('ExternalProgram.version', '0.62.0') @InterpreterObject.method('version') def version_method(self, args: T.List[TYPE_var], kwargs: TYPE_kwargs) -> str: |
