-
Notifications
You must be signed in to change notification settings - Fork 4
/
meson.build
50 lines (44 loc) · 1021 Bytes
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
project(
'werpy',
'c', 'cython',
version : '2.1.2',
license: 'BSD-3',
meson_version: '>= 1.1.0',
default_options : [
'buildtype=debugoptimized',
'warning_level=3',
'c_std=c11'
]
)
# Find Python
py = import('python').find_installation('python3')
# Cython files
pyx_files = files('werpy/metrics.pyx')
# Python Source files
py_files = files(
'werpy/__init__.py',
'werpy/errorhandler.py',
'werpy/normalize.py',
'werpy/summary.py',
'werpy/summaryp.py',
'werpy/wer.py',
'werpy/werp.py',
'werpy/werps.py',
'werpy/wers.py'
)
# Install Python sources
py.install_sources(
py_files,
subdir: 'werpy',
pure: false,
)
# Find NumPy include directories
numpy_includes = run_command(py, '-c', 'import numpy; print(numpy.get_include())').stdout().strip()
# Cython module
py.extension_module(
'metrics',
pyx_files,
include_directories : include_directories(numpy_includes),
install : true,
subdir : 'werpy'
)