Debian Codegraph @

test cases/python/9 extmodule limited api/meson.build

raw
1 project('Python limited api', 'c',
2 default_options : ['buildtype=release', 'werror=true'])
3
4 py_mod = import('python')
5 py = py_mod.find_installation()
6
7 if py.get_variable('Py_GIL_DISABLED', 0) == 1 and py.language_version().version_compare('<3.15')
8 error('MESON_SKIP_TEST: Freethreading Python does not support limited API')
9 endif
10
11 ext_mod_limited = py.extension_module('limited',
12 'limited.c',
13 limited_api: '3.7',
14 install: true,
15 )
16
17 ext_mod = py.extension_module('not_limited',
18 'not_limited.c',
19 install: true,
20 )
21
22 test('load-test',
23 py,
24 args: [files('test_limited.py')],
25 env: { 'PYTHONPATH': meson.current_build_dir() },
26 workdir: meson.current_source_dir()
27 )