2016-02-27 03:04:11 +08:00
|
|
|
project('Python extension module', 'c',
|
|
|
|
default_options : ['buildtype=release'])
|
|
|
|
# Because Windows Python ships only with optimized libs,
|
|
|
|
# we must build this project the same way.
|
2016-02-13 03:57:31 +08:00
|
|
|
|
2016-09-15 01:26:14 +08:00
|
|
|
py3_mod = import('python3')
|
2017-01-09 05:35:59 +08:00
|
|
|
py3 = py3_mod.find_python()
|
2016-12-09 21:27:52 +08:00
|
|
|
py3_dep = dependency('python3', required : false)
|
2016-02-13 03:57:31 +08:00
|
|
|
|
2016-12-09 21:27:52 +08:00
|
|
|
if py3_dep.found()
|
|
|
|
subdir('ext')
|
2016-02-13 03:57:31 +08:00
|
|
|
|
2016-12-09 21:27:52 +08:00
|
|
|
test('extmod',
|
2017-01-09 05:35:59 +08:00
|
|
|
py3,
|
|
|
|
args : files('blaster.py'),
|
2016-12-09 21:27:52 +08:00
|
|
|
env : ['PYTHONPATH=' + pypathdir])
|
|
|
|
else
|
|
|
|
error('MESON_SKIP_TEST: Python3 libraries not found, skipping test.')
|
|
|
|
endif
|