Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD Fix yet another meson.build dependency #29087

Merged
merged 1 commit into from
May 23, 2024

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented May 23, 2024

Another instance of #28820, issue seen in #29081 (comment).

FAILED: sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.cpython-312-darwin.so.p/sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pyx.cpp
  cython -M --fast-fail -3 --cplus '-X language_level=3' '-X boundscheck=False' '-X wraparound=False' '-X initializedcheck=False' '-X nonecheck=False' '-X cdivision=True' '-X profile=False' --include-dir /Users/runner/work/1/s/build/cp312 sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pyx -o sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.cpython-312-darwin.so.p/sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pyx.cpp

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  from ...utils._typedefs cimport float64_t, float32_t, int32_t, intp_t
  ^
  ------------------------------------------------------------

  sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.pxd:1:0: relative cimport beyond main package is not allowed

The error happened because sklearn/metrics/__init__.py was not copied when calling cython.

The error can be reproduce locally on main with:

rm -rf my-build
meson setup my-build
ninja -C my-build sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.cpython-312-x86_64-linux-gnu.so

@lesteve lesteve changed the title FIX Fix yet another meson.build dependency BLD Fix yet another meson.build dependency May 23, 2024
Copy link

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 6adba9c. Link to the linter CI: here

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jeremiedbb jeremiedbb merged commit 5e25db7 into scikit-learn:main May 23, 2024
40 checks passed
@lesteve lesteve deleted the yet-another-meson-dependency branch May 23, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants