MAINT Add user-friendly error when build dependencies are not satifisfied #29132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an arguably simpler alternative to #28721 which is adding checks inside
meson.build
which is a bit cumbersome.The downside of this PR is that checks are only done when using
--check-build-dependencies
in thepip
command, which is easy to forget and makes thepip
command even longer and harder to remember. If you forget to pass--check-build-dependencies
, you may have hard to diagnose compilation errors for example because cython is slightly too old (we want the latest release 3.0.10 at the time of writing).Personally I would slightly lean towards #28721 since you can build scikit-learn via
meson
without going througpip
(meson setup build
+ninja -C build
+ addbuild
folder toPYTHONPATH
). At the same time I would agree that 99% of the usage go throughpip
right now, so this is probably good enough.cc @jeremiedbb who was not a fan of #28721 approach.