From 71a5f990d09f04d8eb8d636abf7e2b446fdf826a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 18 Sep 2018 15:17:31 -0700 Subject: modules/python: Allow use of the native file Currently this just allows setting a "python" variable that always overrides, probably we want to have the option for "python2" and "python3" as well. --- mesonbuild/modules/python.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mesonbuild/modules/python.py') diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 954220b..3b2bf07 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py @@ -480,7 +480,9 @@ class PythonModule(ExtensionModule): if len(args) > 1: raise InvalidArguments('find_installation takes zero or one positional argument.') - if args: + if 'python' in state.environment.config_info.binaries: + name_or_path = state.environment.config_info.binaries['python'] + elif args: name_or_path = args[0] if not isinstance(name_or_path, str): raise InvalidArguments('find_installation argument must be a string.') -- cgit v1.1