summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorMichał Górny <mgorny@quansight.com>2025-11-12 19:48:01 +0100
committerEli Schwartz <eschwartz93@gmail.com>2025-11-14 01:37:49 -0500
commit74395f67e702848d5148c165ce8dbf442fc18636 (patch)
tree768ea606f768ad330e8e8b97d3aea8827864896a /test cases
parent3429a2b4262db109ca24d3440f71a08aeeceb6c9 (diff)
downloadmeson-74395f67e702848d5148c165ce8dbf442fc18636.tar.gz
tests: Skip limited API test on freethreading Python versions
Skip the limited API test when the CPython version used indicates being built with GIL disabled, i.e. the freethreaded build. The freethreaded versions of Python 3.13 and 3.14 do not support the limited API, and attempting to build the test case results in compilation failures. The check is limited to <3.15, so we don't forget to reenable it once limited API is supported. Signed-off-by: Michał Górny <mgorny@quansight.com>
Diffstat (limited to 'test cases')
-rw-r--r--test cases/python/9 extmodule limited api/meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/test cases/python/9 extmodule limited api/meson.build b/test cases/python/9 extmodule limited api/meson.build
index bdf1b7b90..95851241e 100644
--- a/test cases/python/9 extmodule limited api/meson.build
+++ b/test cases/python/9 extmodule limited api/meson.build
@@ -4,6 +4,10 @@ project('Python limited api', 'c',
py_mod = import('python')
py = py_mod.find_installation()
+if py.get_variable('Py_GIL_DISABLED', 0) == 1 and py.language_version().version_compare('<3.15')
+ error('MESON_SKIP_TEST: Freethreading Python does not support limited API')
+endif
+
ext_mod_limited = py.extension_module('limited',
'limited.c',
limited_api: '3.7',