diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-11-04 12:32:25 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-11-22 11:28:43 -0800 |
commit | 822b087f2496ab06e71d7c0a7f85fb36fd01f16d (patch) | |
tree | 05862199466ce289d3cfba6c674758ede7c520f8 /mesonbuild/interpreter/interpreter.py | |
parent | 5593352b87a2cd931fa4e7e5b1e4fa3c4e7fb996 (diff) | |
download | meson-822b087f2496ab06e71d7c0a7f85fb36fd01f16d.zip meson-822b087f2496ab06e71d7c0a7f85fb36fd01f16d.tar.gz meson-822b087f2496ab06e71d7c0a7f85fb36fd01f16d.tar.bz2 |
interpreter: use find_program_impl internally instead of func_find_program
Calling interpreter implementation methods is just a bad idea, apart
from the extra type checking that goes into it, we need to pass more
arguments than we need to calling the impl method.
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index b11a000..3fb0fc3 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1751,7 +1751,7 @@ This will become a hard error in the future.''', location=self.current_node) kwargs['env'] = self.unpack_env_kwarg(kwargs) if 'command' in kwargs and isinstance(kwargs['command'], list) and kwargs['command']: if isinstance(kwargs['command'][0], str): - kwargs['command'][0] = self.func_find_program(node, kwargs['command'][0], {}) + kwargs['command'][0] = self.find_program_impl([kwargs['command'][0]]) tg = build.CustomTarget(name, self.subdir, self.subproject, kwargs, backend=self.backend) self.add_target(tg.name, tg) return tg @@ -1771,7 +1771,7 @@ This will become a hard error in the future.''', location=self.current_node) if isinstance(i, ExternalProgram) and not i.found(): raise InterpreterException(f'Tried to use non-existing executable {i.name!r}') if isinstance(all_args[0], str): - all_args[0] = self.func_find_program(node, all_args[0], {}) + all_args[0] = self.find_program_impl([all_args[0]]) name = args[0] tg = build.RunTarget(name, all_args, kwargs['depends'], self.subdir, self.subproject, kwargs['env']) self.add_target(name, tg) @@ -1849,7 +1849,7 @@ This will become a hard error in the future.''', location=self.current_node) name = name.replace(':', '_') exe = args[1] if isinstance(exe, mesonlib.File): - exe = self.func_find_program(node, args[1], {}) + exe = self.find_program_impl([exe]) env = self.unpack_env_kwarg(kwargs) |