diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-09-18 10:28:14 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-11-14 15:57:37 -0800 |
commit | 95403cb61520978c52b3693a9bf0119e8348c20b (patch) | |
tree | aff931dbdd7241075d5f52c9a1bd24f5c05e63dd /mesonbuild/dependencies/base.py | |
parent | 5a9c9c70df17c8f1ba900933574586c46c3d096f (diff) | |
download | meson-95403cb61520978c52b3693a9bf0119e8348c20b.zip meson-95403cb61520978c52b3693a9bf0119e8348c20b.tar.gz meson-95403cb61520978c52b3693a9bf0119e8348c20b.tar.bz2 |
replace ExternalProgram.from_cross_info with from_bin_list
This more generic method will also be used to check a config file for
binary information.
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r-- | mesonbuild/dependencies/base.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index e67f4c0..a7e2980 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -500,7 +500,8 @@ class PkgConfigDependency(ExternalDependency): if self.required: raise DependencyException('Pkg-config binary missing from cross file') else: - potential_pkgbin = ExternalProgram.from_cross_info(environment.cross_info, 'pkgconfig') + potential_pkgbin = ExternalProgram.from_bin_list( + environment.cross_info.config['binaries'], 'pkgconfig') if potential_pkgbin.found(): self.pkgbin = potential_pkgbin else: @@ -1076,10 +1077,10 @@ class ExternalProgram: return ' '.join(self.command) @staticmethod - def from_cross_info(cross_info, name): - if name not in cross_info.config['binaries']: + def from_bin_list(bins, name): + if name not in bins: return NonExistingExternalProgram() - command = cross_info.config['binaries'][name] + command = bins[name] if not isinstance(command, (list, str)): raise MesonException('Invalid type {!r} for binary {!r} in cross file' ''.format(command, name)) |