diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-09 16:06:55 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2019-01-02 16:22:47 -0500 |
commit | 2b22576fb6a8bb52434068d95eff188a201e6bc5 (patch) | |
tree | b169c0c8c5cf56f68cf8a1d75f35a0fb71ad295f /mesonbuild/modules/python.py | |
parent | dbf080afe99a8bbb04a3bfb19a81363d3b78e7b4 (diff) | |
download | meson-2b22576fb6a8bb52434068d95eff188a201e6bc5.zip meson-2b22576fb6a8bb52434068d95eff188a201e6bc5.tar.gz meson-2b22576fb6a8bb52434068d95eff188a201e6bc5.tar.bz2 |
Remove cross_info; cross file is parsed up front and discarded
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r-- | mesonbuild/modules/python.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 9643ebc..c14ac85 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -501,20 +501,17 @@ class PythonModule(ExtensionModule): if len(args) > 1: raise InvalidArguments('find_installation takes zero or one positional argument.') - if 'python' in state.environment.config_info.binaries: - name_or_path = state.environment.config_info.binaries['python'] - elif args: + name_or_path = state.environment.binaries.host.lookup_entry('python') + if name_or_path is None and args: name_or_path = args[0] if not isinstance(name_or_path, str): raise InvalidArguments('find_installation argument must be a string.') - else: - name_or_path = None if not name_or_path: mlog.log("Using meson's python {}".format(mesonlib.python_command)) python = ExternalProgram('python3', mesonlib.python_command, silent=True) else: - python = ExternalProgram(name_or_path, silent = True) + python = ExternalProgram.from_entry('python3', name_or_path) if not python.found() and mesonlib.is_windows(): pythonpath = self._get_win_pythonpath(name_or_path) |