aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreter.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2022-04-04 09:59:07 -0400
committerEli Schwartz <eschwartz93@gmail.com>2022-04-07 23:44:34 -0400
commite5aa47d8af917282794a8da3956ce444b8d8378d (patch)
tree9ec83d2a2d8fd4adf35b50d91b48719b1d3e6683 /mesonbuild/interpreter/interpreter.py
parent99f510a817f1408e87813d33e4ef6fdd21d2bc20 (diff)
downloadmeson-e5aa47d8af917282794a8da3956ce444b8d8378d.zip
meson-e5aa47d8af917282794a8da3956ce444b8d8378d.tar.gz
meson-e5aa47d8af917282794a8da3956ce444b8d8378d.tar.bz2
Revert "wayland: Also lookup scanner in pkgconfig"
This reverts commit 7954a4c9cbf8355d8c8ea9b3d98df45d9f96f66e.
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
-rw-r--r--mesonbuild/interpreter/interpreter.py24
1 files changed, 4 insertions, 20 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 5339be2..b31b7a8 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -1493,12 +1493,12 @@ external dependencies (including libraries) must go to "dependencies".''')
required: bool = True, silent: bool = True,
wanted: T.Union[str, T.List[str]] = '',
search_dirs: T.Optional[T.List[str]] = None,
- version_func: T.Optional[T.Callable[[T.Union['ExternalProgram', 'build.Executable', 'OverrideProgram']], str]] = None,
- depname: T.Optional[str] = None, varname: T.Optional[str] = None) -> T.Union['ExternalProgram', 'build.Executable', 'OverrideProgram']:
+ version_func: T.Optional[T.Callable[[T.Union['ExternalProgram', 'build.Executable', 'OverrideProgram']], str]] = None
+ ) -> T.Union['ExternalProgram', 'build.Executable', 'OverrideProgram']:
args = mesonlib.listify(args)
extra_info: T.List[mlog.TV_Loggable] = []
- progobj = self.program_lookup(args, for_machine, required, search_dirs, depname, varname, extra_info)
+ progobj = self.program_lookup(args, for_machine, required, search_dirs, extra_info)
if progobj is None:
progobj = self.notfound_program(args)
@@ -1542,9 +1542,7 @@ external dependencies (including libraries) must go to "dependencies".''')
return progobj
def program_lookup(self, args: T.List[mesonlib.FileOrString], for_machine: MachineChoice,
- required: bool, search_dirs: T.List[str],
- depname: T.Optional[str], varname: T.Optional[str],
- extra_info: T.List[mlog.TV_Loggable]
+ required: bool, search_dirs: T.List[str], extra_info: T.List[mlog.TV_Loggable]
) -> T.Optional[T.Union[ExternalProgram, build.Executable, OverrideProgram]]:
progobj = self.program_from_overrides(args, extra_info)
if progobj:
@@ -1558,20 +1556,6 @@ external dependencies (including libraries) must go to "dependencies".''')
return self.find_program_fallback(fallback, args, required, extra_info)
progobj = self.program_from_file_for(for_machine, args)
- if progobj is None and depname:
- # Check if the program path is found in a pkgconfig variable.
- # Currently only used internally by gnome and wayland modules, this
- # code path is not (yet?) exposed in public find_program() function.
- name = args[0]
- if not varname:
- varname = name.replace('-', '_')
- df = DependencyFallbacksHolder(self, [depname], allow_fallback=False)
- dep = df.lookup({'native': for_machine == MachineChoice.BUILD,
- 'required': False})
- if dep.found():
- path = dep.get_variable(pkgconfig=varname, default_value='')
- if path:
- progobj = ExternalProgram(name, [path], silent=True)
if progobj is None:
progobj = self.program_from_system(args, search_dirs, extra_info)
if progobj is None and args[0].endswith('python3'):