summaryrefslogtreecommitdiff
path: root/test cases/unit/38 python extmodule/meson.build
blob: 47986548259bb18e26e60f8980b8c05de76c7ef5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
project('Python extension module', 'c',
  default_options : ['buildtype=release'])

py_mod = import('python')

py = py_mod.find_installation(get_option('python'), required : false)

if py.found()
  py_dep = py.dependency()

  if py_dep.found()
    subdir('ext')

    test('extmod',
      py,
      args : files('blaster.py'),
      env : ['PYTHONPATH=' + pypathdir])
  else
    error('MESON_SKIP_TEST: Python libraries not found, skipping test.')
  endif
else
  error('MESON_SKIP_TEST: Python not found, skipping test.')
endif