Skip to content
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7403b4d
Use Cython's shared memoryview utility between extension modules
thomasjpfan Apr 5, 2025
509eebe
Trigger [cd build]
thomasjpfan Apr 5, 2025
69437fb
Add freethreading_compatible=True [cd build]
thomasjpfan Apr 5, 2025
8c137d4
Remove tag
thomasjpfan Apr 9, 2025
ecf65a5
Merge remote-tracking branch 'upstream/main' into thomasjpfan/cython_…
thomasjpfan Apr 9, 2025
e9949b4
CI [cd build]
thomasjpfan Apr 9, 2025
611bc4d
Merge remote-tracking branch 'upstream/main' into thomasjpfan/cython_…
thomasjpfan Apr 9, 2025
32e6c1e
Revert pyproject.toml
thomasjpfan Apr 10, 2025
4bd9074
Merge remote-tracking branch 'refs/remotes/origin/thomasjpfan/cython_…
thomasjpfan Apr 10, 2025
9a57644
Add dependencies everywhere
thomasjpfan Apr 10, 2025
ebb970d
Add more dependencies
thomasjpfan Apr 10, 2025
73aa0c3
Revert "Add more dependencies"
thomasjpfan Apr 10, 2025
f62b679
Revert "Add dependencies everywhere"
thomasjpfan Apr 10, 2025
d42d0ff
Remove cython_shared_module dependency
thomasjpfan Apr 10, 2025
d764322
CI Trigger build [cd build]
thomasjpfan Apr 10, 2025
60f2d69
Less diff [cd build]
thomasjpfan Apr 10, 2025
e5d463c
Less diff [cd build]
thomasjpfan Apr 10, 2025
50479c4
Less diff
thomasjpfan Apr 11, 2025
e5a6478
[scipy-dev]
lesteve Apr 14, 2025
98ffef6
[scipy-dev] [azure parallel]
lesteve Apr 14, 2025
31784f4
Remove freethreading config
thomasjpfan Apr 23, 2025
d65aab8
Merge branch 'main' of https://github.com/scikit-learn/scikit-learn i…
lesteve Jul 7, 2025
74c600e
[azure parallel] use cython_program variable rather than declare cy
lesteve Jul 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions sklearn/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ else:
check: true
).stdout().strip()

cython_program = find_program(cython.cmd_array()[0])

scikit_learn_cython_args = [
'-X language_level=3', '-X boundscheck=' + boundscheck, '-X wraparound=False',
'-X initializedcheck=False', '-X nonecheck=False', '-X cdivision=True',
Expand All @@ -190,7 +192,25 @@ scikit_learn_cython_args = [
]
cython_args += scikit_learn_cython_args

cython_program = find_program(cython.cmd_array()[0])
if cython.version().version_compare('>=3.1.0')
cython_shared_src = custom_target(
install: false,
output: '_cyutility.c',
command: [
cython_program, '-3', '--fast-fail',
'--generate-shared=' + meson.current_build_dir()/'_cyutility.c'
],
)

py.extension_module('_cyutility',
cython_shared_src,
subdir: 'sklearn',
cython_args: cython_args,
install: true,
)

cython_args += ['--shared=sklearn._cyutility']
endif

cython_gen = generator(cython_program,
arguments : cython_args + ['@INPUT@', '--output-file', '@OUTPUT@'],
Expand All @@ -202,7 +222,6 @@ cython_gen_cpp = generator(cython_program,
output : '@BASENAME@.cpp',
)


# Write file in Meson build dir to be able to figure out from Python code
# whether scikit-learn was built with Meson. Adapted from pandas
# _version_meson.py.
Expand Down