summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2023-01-04 13:17:14 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2023-01-04 13:17:14 +0100
commit86ad561f71f12dbb54aca1eeaac06aca496502cf (patch)
tree0982acf32358b0ce5cf9d063f136cf4908e68667
parent0ae10b37bea9b2f7b8580042ddbb4244c4e9b6e4 (diff)
meson.build: Simplify lookup of python command
See libsigcplusplus PR#83
-rw-r--r--meson.build8
1 files changed, 1 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index e8a90ac..06265d2 100644
--- a/meson.build
+++ b/meson.build
@@ -45,13 +45,7 @@ project_build_root = meson.current_build_dir()
cpp_compiler = meson.get_compiler('cpp')
is_msvc = cpp_compiler.get_id() == 'msvc'
-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.