-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
BLD Check build dependencies in meson.build #28721
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f0f1685
BLD Check build dependencies in meson.build
lesteve 6ff3276
Merge branch 'main' of https://github.com/scikit-learn/scikit-learn i…
lesteve d70de20
Remove --check-build-dependencies
lesteve 5f759ec
Use numpy>=2 in pyproject.toml build dependencies
lesteve 84b9b0f
[gh cd build] [azure parallel]
lesteve e32e4c2
[azure parallel] [cd build]
jeremiedbb 3dc8999
[cd build gh] [azure parallel]
lesteve b82336d
Add comment
lesteve f8930b3
Tweak comment
lesteve e1a208f
Run the build dependencies version checks only when not cross-compiling
lesteve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: I think this one should be removed, there are other places in the code where we execute Python script without protection.
I have to say I don't remember all the details about this and need to have a closer look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I looked a little bit more at this and I moved all the build dependency version checks inside the
if not meson.is_cross_build()
clause, because I think this is safer. If I am wrong, I guess we may hear from some of this people relying on cross-compilation or they will do patches without telling us ...It looks like conda-forge does not care about whether there is the protection
if not meson.is_cross_build()
, I tested this in conda-forge/scikit-learn-feedstock#268.On the other hand, other cross-compilation settings may care more, so I would still leave this.
For example the scipy Nix package is using
numpy-include-dir
which is also meant to be used for tricky cross-compilation settings (basically you can not run the Python interpreter or the wrong numpy include dir gets picked): https://github.com/NixOS/nixpkgs/blob/81c768e223876ce8ff5120934c5d8f485731c6ed/pkgs/development/python-modules/scipy/default.nix#L61The scikit-learn Nix package has a patch to get the version directly rather than running a Python script:
https://github.com/NixOS/nixpkgs/blob/fcf65eb2954fc78232b038ceef5d6a5390a734ec/pkgs/development/python-modules/scikit-learn/default.nix#L42-L44