Skip to content

Commit cf81ec7

Browse files
authored
maybe fix?
1 parent 6368144 commit cf81ec7

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

meson.build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ if cy.version().version_compare('>=3.1.0')
6565
subdir: 'pandas/_libs',
6666
install: true,
6767
)
68-
69-
add_project_arguments('--shared=pandas._libs._cyutility', language: 'cython')
7068
endif
7169

7270
# Needed by pandas.test() when it looks for the pytest ini options

pandas/_libs/meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ if get_option('buildtype') == 'debug'
148148
cython_args += ['--gdb']
149149
endif
150150

151+
# Use shared utility code to reduce wheel sizes
152+
# copied from https://github.com/scikit-learn/scikit-learn/pull/31151/files
153+
if cy.version().version_compare('>=3.1.0')
154+
cython_args += ['--shared=pandas._libs._cyutility']
155+
endif
156+
151157
foreach ext_name, ext_dict : libs_sources
152158
py.extension_module(
153159
ext_name,

pandas/_libs/tslibs/meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ if get_option('buildtype') == 'debug'
2828
cython_args += ['--gdb']
2929
endif
3030

31+
# Use shared utility code to reduce wheel sizes
32+
# copied from https://github.com/scikit-learn/scikit-learn/pull/31151/files
33+
if cy.version().version_compare('>=3.1.0')
34+
cython_args += ['--shared=pandas._libs._cyutility']
35+
endif
36+
3137
foreach ext_name, ext_dict : tslibs_sources
3238
py.extension_module(
3339
ext_name,

pandas/_libs/window/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
py.extension_module(
22
'aggregations',
33
['aggregations.pyx'],
4-
cython_args: ['-X always_allow_keywords=true'],
4+
cython_args: ['-X always_allow_keywords=true --shared=pandas._libs._cyutility'],
55
include_directories: [inc_np, inc_pd],
66
subdir: 'pandas/_libs/window',
77
override_options: ['cython_language=cpp'],
@@ -11,7 +11,7 @@ py.extension_module(
1111
py.extension_module(
1212
'indexers',
1313
['indexers.pyx'],
14-
cython_args: ['-X always_allow_keywords=true'],
14+
cython_args: ['-X always_allow_keywords=true --shared=pandas._libs._cyutility'],
1515
include_directories: [inc_np, inc_pd],
1616
subdir: 'pandas/_libs/window',
1717
install: true,

0 commit comments

Comments
 (0)