Skip to content

Commit 5e25db7

Browse files
authored
BLD Fix yet another meson.build dependency (scikit-learn#29087)
1 parent 1bd9c1d commit 5e25db7

File tree

1 file changed

+6
-1
lines changed
  • sklearn/metrics/_pairwise_distances_reduction

1 file changed

+6
-1
lines changed

sklearn/metrics/_pairwise_distances_reduction/meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
# needed for the cimport to work
1212
_pairwise_distances_reduction_cython_tree = [
1313
fs.copyfile('__init__.py'),
14+
# We are in a sub-module of metrics, so we always need to have
15+
# sklearn/metrics/__init__.py copied to the build directory to avoid the
16+
# error:
17+
# relative cimport beyond main package is not allowed
18+
metrics_cython_tree
1419
]
1520

1621
_classmode_pxd = fs.copyfile('_classmode.pxd')
@@ -30,7 +35,7 @@ _datasets_pair_pyx = custom_target(
3035
_datasets_pair = py.extension_module(
3136
'_datasets_pair',
3237
[_datasets_pair_pxd, _datasets_pair_pyx,
33-
_pairwise_distances_reduction_cython_tree, utils_cython_tree],
38+
_pairwise_distances_reduction_cython_tree, utils_cython_tree],
3439
dependencies: [np_dep, openmp_dep],
3540
override_options: ['cython_language=cpp'],
3641
cython_args: cython_args,

0 commit comments

Comments
 (0)