forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
48 lines (43 loc) · 1.6 KB
/
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
# This file is adapted from https://github.com/scipy/scipy/blob/main/meson.build
project(
'pandas',
'c', 'cpp', 'cython',
version: run_command(['python', 'generate_version.py', '--print'], check: true).stdout().strip(),
license: 'BSD-3',
meson_version: '>=1.0.1',
default_options: [
# TODO: investigate, does meson try to compile against debug Python
# when buildtype = debug, this seems to be causing problems on CI
# where provided Python is not compiled in debug mode
'buildtype=release',
# TODO: Reactivate werror, some warnings on Windows
#'werror=true',
'c_std=c99'
]
)
py_mod = import('python')
fs = import('fs')
py = py_mod.find_installation('python')
py_dep = py.dependency()
tempita = files('generate_pxi.py')
versioneer = files('generate_version.py')
add_project_arguments('-DNPY_NO_DEPRECATED_API=0', language : 'c')
add_project_arguments('-DNPY_NO_DEPRECATED_API=0', language : 'cpp')
if fs.exists('_version_meson.py')
py.install_sources('_version_meson.py', pure: false, subdir: 'pandas')
else
custom_target('write_version_file',
output: '_version_meson.py',
command: [
py, versioneer, '-o', '@OUTPUT@'
],
build_by_default: true,
build_always_stale: true,
install: true,
install_dir: py.get_install_dir(pure: false) / 'pandas'
)
meson.add_dist_script(py, versioneer, '-o', '_version_meson.py')
endif
# Needed by pandas.test() when it looks for the pytest ini options
py.install_sources('pyproject.toml', pure: false, subdir: 'pandas')
subdir('pandas')