Skip to content

MAINT Add user-friendly error when build dependencies are not satifisfied #29132

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 2 commits into from
Jun 4, 2024

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented May 29, 2024

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 the pip command, which is easy to forget and makes the pip 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 throug pip (meson setup build + ninja -C build + add build folder to PYTHONPATH). At the same time I would agree that 99% of the usage go through pip right now, so this is probably good enough.

cc @jeremiedbb who was not a fan of #28721 approach.

Copy link

github-actions bot commented May 29, 2024

✔️ Linting Passed

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

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

@lesteve
Copy link
Member Author

lesteve commented May 29, 2024

Hmmm it looks like you need pip recent enough to have --check-build-dependencies (>=22.1.1 according to pypa/pip#11117 released May 2022) and some builds pip is too old:

  • ubuntu_atlas: 22.0.2
  • debian_atlas_32bit: 20.3.4

@adrinjalali adrinjalali added Build / CI Quick Review For PRs that are quick to review labels Jun 3, 2024
@adrinjalali
Copy link
Member

@jeremiedbb would you have time to have a look?

@jeremiedbb
Copy link
Member

This PR doesn't prevent us from also merging #28721. I find this one uncontroversial and already an improvement so let's merge it first.

@jeremiedbb jeremiedbb merged commit 0878f91 into scikit-learn:main Jun 4, 2024
32 checks passed
@lesteve lesteve deleted the check-build-dependencies branch June 12, 2024 06:55
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jul 2, 2024
@jeremiedbb jeremiedbb mentioned this pull request Jul 2, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build / CI Quick Review For PRs that are quick to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants