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 4747cy = meson .get_compiler(' cython' )
4848if cy.version().version_compare(' >=3.1.0' )
4949 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' )
5071endif
5172
5273# Needed by pandas.test() when it looks for the pytest ini options
You can’t perform that action at this time.
0 commit comments