forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
174 lines (165 loc) · 5.67 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
_algos_take_helper = custom_target('algos_take_helper_pxi',
output: 'algos_take_helper.pxi',
input: 'algos_take_helper.pxi.in',
command: [
py, tempita, '@INPUT@', '-o', '@OUTDIR@'
]
)
_algos_common_helper = custom_target('algos_common_helper_pxi',
output: 'algos_common_helper.pxi',
input: 'algos_common_helper.pxi.in',
command: [
py, tempita, '@INPUT@', '-o', '@OUTDIR@'
]
)
_khash_primitive_helper = custom_target('khash_primitive_helper_pxi',
output: 'khash_for_primitive_helper.pxi',
input: 'khash_for_primitive_helper.pxi.in',
command: [
py, tempita, '@INPUT@', '-o', '@OUTDIR@'
]
)
_hashtable_class_helper = custom_target('hashtable_class_helper_pxi',
output: 'hashtable_class_helper.pxi',
input: 'hashtable_class_helper.pxi.in',
command: [
py, tempita, '@INPUT@', '-o', '@OUTDIR@'
]
)
_hashtable_func_helper = custom_target('hashtable_func_helper_pxi',
output: 'hashtable_func_helper.pxi',
input: 'hashtable_func_helper.pxi.in',
command: [
py, tempita, '@INPUT@', '-o', '@OUTDIR@'
]
)
_index_class_helper = custom_target('index_class_helper_pxi',
output: 'index_class_helper.pxi',
input: 'index_class_helper.pxi.in',
command: [
py, tempita, '@INPUT@', '-o', '@OUTDIR@'
]
)
_sparse_op_helper = custom_target('sparse_op_helper_pxi',
output: 'sparse_op_helper.pxi',
input: 'sparse_op_helper.pxi.in',
command: [
py, tempita, '@INPUT@', '-o', '@OUTDIR@'
]
)
_intervaltree_helper = custom_target('intervaltree_helper_pxi',
output: 'intervaltree.pxi',
input: 'intervaltree.pxi.in',
command: [
py, tempita, '@INPUT@', '-o', '@OUTDIR@'
]
)
_algos_pxi_dep = declare_dependency(sources: [_algos_take_helper, _algos_common_helper])
_khash_pxi_dep = declare_dependency(sources: _khash_primitive_helper)
_hashtable_pxi_dep = declare_dependency(
sources: [_hashtable_class_helper, _hashtable_func_helper]
)
_index_pxi_dep = declare_dependency(sources: _index_class_helper)
_intervaltree_pxi_dep = declare_dependency(sources: _intervaltree_helper)
_sparse_pxi_dep = declare_dependency(sources: _sparse_op_helper)
subdir('tslibs')
libs_sources = {
# Dict of extension name -> dict of {sources, include_dirs, and deps}
# numpy include dir is implicitly included
'algos': {'sources': ['algos.pyx'],
'deps': [_khash_pxi_dep, _algos_pxi_dep]},
'arrays': {'sources': ['arrays.pyx']},
'groupby': {'sources': ['groupby.pyx']},
'hashing': {'sources': ['hashing.pyx']},
'hashtable': {'sources': ['hashtable.pyx'],
'deps': [_khash_pxi_dep, _hashtable_pxi_dep]},
'index': {'sources': ['index.pyx'],
'deps': [_khash_pxi_dep, _index_pxi_dep]},
'indexing': {'sources': ['indexing.pyx']},
'internals': {'sources': ['internals.pyx']},
'interval': {'sources': ['interval.pyx'],
'deps': [_khash_pxi_dep, _intervaltree_pxi_dep]},
'join': {'sources': ['join.pyx'],
'deps': [_khash_pxi_dep]},
'lib': {'sources': ['lib.pyx', 'src/parser/tokenizer.c']},
'missing': {'sources': ['missing.pyx']},
'pandas_datetime': {'sources': ['src/vendored/numpy/datetime/np_datetime.c',
'src/vendored/numpy/datetime/np_datetime_strings.c',
'src/datetime/date_conversions.c',
'src/datetime/pd_datetime.c']},
'pandas_parser': {'sources': ['src/parser/tokenizer.c',
'src/parser/io.c',
'src/parser/pd_parser.c']},
'parsers': {'sources': ['parsers.pyx', 'src/parser/tokenizer.c', 'src/parser/io.c'],
'deps': [_khash_pxi_dep]},
'json': {'sources': ['src/vendored/ujson/python/ujson.c',
'src/vendored/ujson/python/objToJSON.c',
'src/vendored/ujson/python/JSONtoObj.c',
'src/vendored/ujson/lib/ultrajsonenc.c',
'src/vendored/ujson/lib/ultrajsondec.c']},
'ops': {'sources': ['ops.pyx']},
'ops_dispatch': {'sources': ['ops_dispatch.pyx']},
'properties': {'sources': ['properties.pyx']},
'reshape': {'sources': ['reshape.pyx']},
'sas': {'sources': ['sas.pyx']},
'byteswap': {'sources': ['byteswap.pyx']},
'sparse': {'sources': ['sparse.pyx'],
'deps': [_sparse_pxi_dep]},
'tslib': {'sources': ['tslib.pyx']},
'testing': {'sources': ['testing.pyx']},
'writers': {'sources': ['writers.pyx']}
}
cython_args = [
'--include-dir',
meson.current_build_dir(),
'-X always_allow_keywords=true'
]
if get_option('buildtype') == 'debug'
cython_args += ['--gdb']
endif
foreach ext_name, ext_dict : libs_sources
py.extension_module(
ext_name,
ext_dict.get('sources'),
cython_args: cython_args,
include_directories: [inc_np, inc_pd],
dependencies: ext_dict.get('deps', ''),
subdir: 'pandas/_libs',
install: true
)
endforeach
# Basically just __init__.py and the .pyi files
sources_to_install = [
'__init__.py',
'algos.pyi',
'arrays.pyi',
'byteswap.pyi',
'groupby.pyi',
'hashing.pyi',
'hashtable.pyi',
'index.pyi',
'indexing.pyi',
'internals.pyi',
'interval.pyi',
'join.pyi',
'json.pyi',
'lib.pyi',
'missing.pyi',
'ops.pyi',
'ops_dispatch.pyi',
'parsers.pyi',
'properties.pyi',
'reshape.pyi',
'sas.pyi',
'sparse.pyi',
'testing.pyi',
'tslib.pyi',
'writers.pyi'
]
foreach source: sources_to_install
py.install_sources(
source,
subdir: 'pandas/_libs'
)
endforeach
subdir('window')