| 1 |
pyflags_cmd = run_command('../../scripts/get-python-flags') |
| 2 |
|
| 3 |
if pyflags_cmd.stderr() != '' |
| 4 |
error(pyflags_cmd.stderr()) |
| 5 |
endif |
| 6 |
|
| 7 |
pyflags = pyflags_cmd.stdout().split('\n') |
| 8 |
|
| 9 |
if pyflags[0] == 'ERROR' |
| 10 |
error(pyflags[1].strip()) |
| 11 |
endif |
| 12 |
|
| 13 |
cpp_extra_args = pyflags[1].strip().split() |
| 14 |
link_extra_args = pyflags[2].strip().split() |
| 15 |
|
| 16 |
cpp_extra_args += ['-w'] |
| 17 |
|
| 18 |
# Ensure proper ordering, arguments will be deduplicated anyway |
| 19 |
cpp_extra_args = global_args + cpp_extra_args |
| 20 |
link_extra_args = global_link_args + link_extra_args |
| 21 |
|
| 22 |
py_sources = ['btllib_wrap.cxx'] |
| 23 |
btllib_py = shared_module('_btllib', |
| 24 |
py_sources, |
| 25 |
name_suffix : 'so', |
| 26 |
include_directories : btllib_include, |
| 27 |
dependencies : deps + [ btllib_dep ], |
| 28 |
cpp_args : cpp_extra_args, |
| 29 |
link_args : link_extra_args, |
| 30 |
install : true, |
| 31 |
install_dir : 'lib/btllib/python/btllib', |
| 32 |
name_prefix : '') |
| 33 |
|
| 34 |
install_data('btllib.py', install_dir : 'lib/btllib/python/btllib', rename : '__init__.py') |
| 35 |
configure_file(input : 'setup.py', |
| 36 |
output : 'setup.py', |
| 37 |
install_dir : 'lib/btllib/python', |
| 38 |
configuration : {'PROJECT_VERSION' : meson.project_version()}) |