Debian Codegraph @

test cases/python3/3 cython/meson.build

raw
1 project('cython', 'c',
2 default_options : ['warning_level=3'])
3
4 cython = find_program('cython3', required : false)
5 py3_dep = dependency('python3', required : false)
6
7 if cython.found() and py3_dep.found()
8 py3_dep = dependency('python3')
9 py3_dep_majver = py3_dep.version().split('.')
10 py3_dep_majver = py3_dep_majver[0] + '.' + py3_dep_majver[1]
11 py3_mod = import('python3')
12 py3 = py3_mod.find_python()
13 if py3_dep_majver != py3_mod.language_version()
14 v = py3_mod.language_version()
15 error('MESON_SKIP_TEST: deprecated python3 module is non-functional when default python3 is different from Meson\'s', v)
16 endif
17 subdir('libdir')
18
19 test('cython tester',
20 py3,
21 args : files('cytest.py'),
22 env : ['PYTHONPATH=' + pydir]
23 )
24 else
25 error('MESON_SKIP_TEST: Cython3 or Python3 libraries not found, skipping test.')
26 endif