parent
4f1a240bc2
commit
895de87b90
4 changed files with 30 additions and 15 deletions
@ -1,20 +1,27 @@ |
||||
project('cython', 'c', |
||||
default_options : ['warning_level=3']) |
||||
|
||||
cython = find_program('cython3', required : false) |
||||
py3_dep = dependency('python3', required : false) |
||||
if meson.backend() != 'ninja' |
||||
error('MESON_SKIP_TEST: Ninja backend required') |
||||
endif |
||||
|
||||
if cython.found() and py3_dep.found() |
||||
py_mod = import('python') |
||||
py3 = py_mod.find_installation() |
||||
py3_dep = py3.dependency() |
||||
subdir('libdir') |
||||
cython = find_program('cython', required : false) |
||||
if not cython.found() |
||||
error('MESON_SKIP_TEST: Cython3 not found.') |
||||
endif |
||||
|
||||
test('cython tester', |
||||
py3, |
||||
args : files('cytest.py'), |
||||
env : ['PYTHONPATH=' + pydir] |
||||
) |
||||
else |
||||
error('MESON_SKIP_TEST: Cython3 or Python3 libraries not found, skipping test.') |
||||
py3_dep = dependency('python3', required : false) |
||||
if not py3_dep.found() |
||||
error('MESON_SKIP_TEST: Python library not found.') |
||||
endif |
||||
|
||||
py_mod = import('python') |
||||
py3 = py_mod.find_installation() |
||||
py3_dep = py3.dependency() |
||||
subdir('libdir') |
||||
|
||||
test('cython tester', |
||||
py3, |
||||
args : files('cytest.py'), |
||||
env : ['PYTHONPATH=' + pydir] |
||||
) |
||||
|
Loading…
Reference in new issue