-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
/
meson.build
153 lines (146 loc) · 5.2 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
_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@'
]
)
_khash_primitive_helper_dep = declare_dependency(sources: _khash_primitive_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', _algos_common_helper, _algos_take_helper, _khash_primitive_helper]},
'arrays': {'sources': ['arrays.pyx']},
'groupby': {'sources': ['groupby.pyx']},
'hashing': {'sources': ['hashing.pyx']},
'hashtable': {'sources': ['hashtable.pyx', _khash_primitive_helper, _hashtable_class_helper, _hashtable_func_helper]},
'index': {'sources': ['index.pyx', _index_class_helper]},
'indexing': {'sources': ['indexing.pyx']},
'internals': {'sources': ['internals.pyx']},
'interval': {'sources': ['interval.pyx', _intervaltree_helper],
'deps': _khash_primitive_helper_dep},
'join': {'sources': ['join.pyx', _khash_primitive_helper],
'deps': _khash_primitive_helper_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_primitive_helper_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', _sparse_op_helper]},
'tslib': {'sources': ['tslib.pyx']},
'testing': {'sources': ['testing.pyx']},
'writers': {'sources': ['writers.pyx']}
}
foreach ext_name, ext_dict : libs_sources
py.extension_module(
ext_name,
ext_dict.get('sources'),
cython_args: ['--include-dir', meson.current_build_dir(), '-X always_allow_keywords=true'],
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')