Skip to content

Commit ffb24fc

Browse files
committed
add lines to build in freethreaded mode when cython 3.1 is released
1 parent 9c4693e commit ffb24fc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

discretize/_extensions/meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,19 @@ if cy_line_trace
4949
cython_c_args += ['-DCYTHON_TRACE_NOGIL=1']
5050
endif
5151

52+
cython_args = []
53+
if cy.version().version_compare('>=3.1.0')
54+
cython_args += ['-Xfreethreading_compatible=True']
55+
endif
56+
5257
cython_cpp_args = cython_c_args
5358

5459
module_path = 'discretize/_extensions'
5560

5661
py.extension_module(
5762
'interputils_cython',
5863
'interputils_cython.pyx',
64+
cython_args: cython_args,
5965
c_args: cython_c_args,
6066
install: true,
6167
subdir: module_path,
@@ -65,6 +71,7 @@ py.extension_module(
6571
py.extension_module(
6672
'tree_ext',
6773
['tree_ext.pyx' , 'tree.cpp', 'geom.cpp'],
74+
cython_args: cython_args,
6875
cpp_args: cython_cpp_args,
6976
install: true,
7077
subdir: module_path,
@@ -75,6 +82,7 @@ py.extension_module(
7582
py.extension_module(
7683
'simplex_helpers',
7784
'simplex_helpers.pyx',
85+
cython_args: cython_args,
7886
cpp_args: cython_cpp_args,
7987
install: true,
8088
subdir: module_path,

0 commit comments

Comments
 (0)