From 7fb4e9a75d9a521079a55c976ad4d115cd7b03e4 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 21 Jun 2022 23:18:55 +0200 Subject: build: Check for python version --- meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) 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('.') -- cgit v1.2.1