Debian Codegraph @

test cases/python/1 basic/meson.build

raw
1 project('python sample')
2
3 py_mod = import('python')
4 py = py_mod.find_installation('python3')
5
6 py_version = py.language_version()
7 if py_version.version_compare('< 3.2')
8 error('MESON_SKIP_TEST python 3 required for tests')
9 endif
10
11 py_full_version = py.version()
12 message(f'Using python version: @py_full_version@')
13
14 py_purelib = py.get_path('purelib')
15 if not (py_purelib.endswith('site-packages') or py_purelib.endswith('dist-packages'))
16 error('Python3 purelib path seems invalid? ' + py_purelib)
17 endif
18 message('Python purelib path:', py_purelib)
19
20 # could be 'lib64' or 'Lib' on some systems
21 py_platlib = py.get_path('platlib')
22 if not (py_platlib.endswith('site-packages') or py_platlib.endswith('dist-packages'))
23 error('Python3 platlib path seems invalid? ' + py_platlib)
24 endif
25
26 main = files('prog.py')
27
28 test('toplevel', py, args : main)
29
30 subdir('subdir')