summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2022-06-21 23:18:55 +0200
committerChristian Persch <chpe@src.gnome.org>2022-06-21 23:18:55 +0200
commit7fb4e9a75d9a521079a55c976ad4d115cd7b03e4 (patch)
tree1bcc54d0e065d5eeaf418c867e26bece36647a24
parent8f53192432560e61b6c0de3692de44c245c40e55 (diff)
downloadvte-7fb4e9a75d9a521079a55c976ad4d115cd7b03e4.tar.gz
build: Check for python version
-rw-r--r--meson.build11
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 33e3a5fe..51876240 100644
--- a/meson.build
+++ b/meson.build
@@ -33,6 +33,7 @@ c_req_std = 'gnu11'
cxx_req_std = 'gnu++20'
gxx_req_version = '10.0'
clangxx_req_version = '11.0'
+py_req_version = '3.7'
# Version requirements
@@ -110,6 +111,7 @@ enable_debug = get_option('debugg') or get_option('debug') or get_option('buildt
gnome = import('gnome')
pkg = import('pkgconfig')
+py = import('python')
# Compilers
@@ -159,6 +161,15 @@ if cxx.get_id() == 'clang'
assert(cxx.version().version_compare('>=' + clangxx_req_version), 'needs clang++ >= ' + clangxx_req_version + ' for ' + cxx_req_std + ' support')
endif
+# Python interpreter
+
+py_req_modules = [
+ 'dataclasses',
+]
+
+python = py.find_installation(modules: py_req_modules)
+assert(python.language_version().version_compare('>=' + py_req_version), 'needs python3 >= ' + py_req_version)
+
# Include directories
top_inc = include_directories('.')