summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2019-06-17 18:37:44 +0000
committerDylan Baker <dylan@pnwbakers.com>2019-06-28 12:51:21 -0700
commitb120a02b21791ef9898dd342af8102ec9f4d36d9 (patch)
tree99cd40297a739859f43f17957b444cdff512f076 /meson.build
parentc81c784a4a05f8a957a649d73c8194247de47b56 (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 <Arfrever@Apache.Org> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> v2: - Add missing `endif` keyword (Dylan)
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 2da66b74924..4e1990eb600 100644
--- a/meson.build
+++ b/meson.build
@@ -746,7 +746,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',
'''