summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorPierre Le Marre <dev@wismill.eu>2024-06-11 06:54:39 +0200
committerPierre Le Marre <dev@wismill.eu>2024-06-11 06:54:39 +0200
commit81789a7ce1e35675103b7bae537d82270a085ecd (patch)
tree0dca15323e6044cc86df7d4ba47732cf18586ee3 /rules
parentaa709f2f45e7b6164dd583389489043cf92c5b1c (diff)
rules: Check required Python version
Diffstat (limited to 'rules')
-rw-r--r--rules/meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules/meson.build b/rules/meson.build
index bc64ca50..0978150e 100644
--- a/rules/meson.build
+++ b/rules/meson.build
@@ -126,6 +126,15 @@ if get_option('compat-rules')
endforeach
endif # compat-rules
+MINIMUM_PYTHON_VERSION = '3.11'
+pymod = import('python')
+python = pymod.find_installation('python3')
+if python.language_version().version_compare('<@0@'.format(MINIMUM_PYTHON_VERSION))
+ error('Minimum required Python version: @0@, but got: @1@'.format(
+ MINIMUM_PYTHON_VERSION,
+ python.language_version()
+ ))
+endif
merge_py = find_program('merge.py')
xml2lst = find_program('xml2lst.pl')
foreach ruleset: ['base', 'evdev']