File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 47
47
cy = meson .get_compiler(' cython' )
48
48
if cy.version().version_compare(' >=3.1.0' )
49
49
add_project_arguments (' -Xfreethreading_compatible=true' , language : ' cython' )
50
+
51
+ # Use shared utility code to reduce wheel sizes
52
+ # copied from https://github.com/scikit-learn/scikit-learn/pull/31151/files
53
+ cy = find_program (cy.cmd_array()[0 ])
54
+ cython_shared_src = custom_target (
55
+ install : false ,
56
+ output : ' _cyutility.c' ,
57
+ command : [
58
+ cy, ' -3' , ' --fast-fail' ,
59
+ ' --generate-shared=' + meson .current_build_dir()/ ' _cyutility.c'
60
+ ],
61
+ )
62
+
63
+ py.extension_module(' _cyutility' ,
64
+ cython_shared_src,
65
+ subdir : ' pandas/_libs' ,
66
+ cython_args : cython_args,
67
+ install : true ,
68
+ )
69
+
70
+ add_project_arguments (' --shared=pandas._libs._cyutility' ' , language: ' cython' )
50
71
endif
51
72
52
73
# Needed by pandas.test() when it looks for the pytest ini options
You can’t perform that action at this time.
0 commit comments