diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2018-09-18 15:17:31 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2018-11-14 15:57:37 -0800 |
| commit | 71a5f990d09f04d8eb8d636abf7e2b446fdf826a (patch) | |
| tree | c9b4b3d5f45df4ff9340c26c35a909aef19bd424 /mesonbuild/modules/python.py | |
| parent | 091452f8cd886dedc2bc5d3ec292dcf899989a24 (diff) | |
| download | meson-71a5f990d09f04d8eb8d636abf7e2b446fdf826a.tar.gz | |
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.
Diffstat (limited to 'mesonbuild/modules/python.py')
| -rw-r--r-- | mesonbuild/modules/python.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py index 954220bde..3b2bf077e 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.') |
