From 699fb49a70038a682fcc381108fc283d12ba48bc Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Wed, 4 Jan 2023 14:42:29 +0100 Subject: meson.build: Simplify lookup of python command See libsigcplusplus PR#83 --- meson.build | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/meson.build b/meson.build index cb78ef16..974ae2ae 100644 --- a/meson.build +++ b/meson.build @@ -49,12 +49,7 @@ is_msvc = cpp_compiler.get_id() == 'msvc' is_host_windows = host_machine.system() == 'windows' is_os_cocoa = host_machine.system() == 'darwin' -python3 = import('python').find_installation() -python_version = python3.language_version() -python_version_req = '>= 3.5' -if not python_version.version_compare(python_version_req) - error('Requires Python @0@, found @1@.'.format(python_version_req, python_version)) -endif +python3 = find_program('python3', version: '>=3.5') # Do we build from a git repository? # Suppose we do if and only if the meson.build file is tracked by git. -- cgit v1.2.1