Skip to content

Commit 573c05c

Browse files
authored
add more version checks
1 parent be7ad4e commit 573c05c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pandas/_libs/window/meson.build

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
cy_args = ['-X always_allow_keywords=true']
2+
# Use shared utility code to reduce wheel sizes
3+
# copied from https://github.com/scikit-learn/scikit-learn/pull/31151/files
4+
if cy.version().version_compare('>=3.1.0')
5+
cython_args += ['--shared=pandas._libs._cyutility']
6+
endif
7+
18
py.extension_module(
29
'aggregations',
310
['aggregations.pyx'],
4-
cython_args: ['-X always_allow_keywords=true', '--shared=pandas._libs._cyutility'],
11+
cython_args: cy_args,
512
include_directories: [inc_np, inc_pd],
613
subdir: 'pandas/_libs/window',
714
override_options: ['cython_language=cpp'],
@@ -11,7 +18,7 @@ py.extension_module(
1118
py.extension_module(
1219
'indexers',
1320
['indexers.pyx'],
14-
cython_args: ['-X always_allow_keywords=true', '--shared=pandas._libs._cyutility'],
21+
cython_args: cy_args,
1522
include_directories: [inc_np, inc_pd],
1623
subdir: 'pandas/_libs/window',
1724
install: true,

0 commit comments

Comments
 (0)