@@ -129,15 +129,6 @@ libs_sources = {
129
129
' parsers' : {' sources' : [cython_sources[' parsers.pyx' ], ' src/parser/tokenizer.c' , ' src/parser/io.c' ],
130
130
' include_dirs' : [klib_include, ' src' ],
131
131
' deps' : _khash_primitive_helper_dep},
132
- ' json' : {' sources' : [' src/ujson/python/ujson.c' ,
133
- ' src/ujson/python/objToJSON.c' ,
134
- ' src/ujson/python/date_conversions.c' ,
135
- ' src/ujson/python/JSONtoObj.c' ,
136
- ' src/ujson/lib/ultrajsonenc.c' ,
137
- ' src/ujson/lib/ultrajsondec.c' ,
138
- ' tslibs/src/datetime/np_datetime.c' ,
139
- ' tslibs/src/datetime/np_datetime_strings.c' ],
140
- ' include_dirs' : [inc_datetime, ' src/ujson/lib' , ' src/ujson/python' ]},
141
132
' reduction' : {' sources' : [' reduction.pyx' ]},
142
133
' ops' : {' sources' : [' ops.pyx' ]},
143
134
' ops_dispatch' : {' sources' : [' ops_dispatch.pyx' ]},
@@ -162,6 +153,32 @@ foreach ext_name, ext_dict : libs_sources
162
153
)
163
154
endforeach
164
155
156
+ # Some deprecated NumPy API usage in ujson cannot easily be replaced
157
+ # (to try, use: `c_args: '-DNPY_NO_DEPRECATED_API=NPY_1_9_API_VERSION'`),
158
+ # so silence the build warnings for the time being.
159
+ cc = meson .get_compiler(' c' )
160
+ _cflag_Wno_cpp = cc.get_supported_arguments(' -Wno-cpp' )
161
+
162
+ py.extension_module(
163
+ ' json' ,
164
+ [' src/ujson/python/ujson.c' ,
165
+ ' src/ujson/python/objToJSON.c' ,
166
+ ' src/ujson/python/date_conversions.c' ,
167
+ ' src/ujson/python/JSONtoObj.c' ,
168
+ ' src/ujson/lib/ultrajsonenc.c' ,
169
+ ' src/ujson/lib/ultrajsondec.c' ,
170
+ ' tslibs/src/datetime/np_datetime.c' ,
171
+ ' tslibs/src/datetime/np_datetime_strings.c'
172
+ ],
173
+ c_args : _cflag_Wno_cpp,
174
+ include_directories : [
175
+ inc_np, inc_datetime, ' src/ujson/lib' , ' src/ujson/python'
176
+ ],
177
+ dependencies : ext_dict.get(' deps' , '' ),
178
+ subdir : ' pandas/_libs' ,
179
+ install : true
180
+ )
181
+
165
182
py.install_sources(' __init__.py' ,
166
183
pure : false ,
167
184
subdir : ' pandas/_libs' )
0 commit comments