diff options
author | Arfrever Frehtes Taifersar Arahesis <[email protected]> | 2019-06-17 18:37:44 +0000 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-07-02 10:12:55 +0200 |
commit | cb3072488cd327155206e92d1ad8eb72a23ab04e (patch) | |
tree | 2851dbbb3eabc2cf9b1e297f6001febb38f5a9f3 | |
parent | 3d0e6d3cff657923889422d53e24bee70daa74d1 (diff) |
meson: Improve detection of Python when using Meson >=0.50.
Previously, on systems where multiple versions of Python 3 (e.g. 3.6 and 3.7)
are installed, wrong version of Python 3 could have been used.
The proper fix requires availability of path() method in Meson's python
module, which has been added in Meson 0.50:
https://github.com/mesonbuild/meson/pull/4616
Distro Bug: https://bugs.gentoo.org/671308
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <[email protected]>
Reviewed-by: Dylan Baker <[email protected]>
v2: - Add missing `endif` keyword (Dylan)
(cherry picked from commit b120a02b21791ef9898dd342af8102ec9f4d36d9)
-rw-r--r-- | meson.build | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build index a20ada0117a..f5d28616005 100644 --- a/meson.build +++ b/meson.build @@ -754,7 +754,11 @@ if with_platform_haiku pre_args += '-DHAVE_HAIKU_PLATFORM' endif -prog_python = import('python3').find_python() +if meson.version().version_compare('>=0.50') + prog_python = import('python').find_installation('python3') +else + prog_python = import('python3').find_python() +endif has_mako = run_command( prog_python, '-c', ''' |