Skip to content

BLD Do not require meson-python when using meson directly #29578

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

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented Jul 29, 2024

meson-python is used when going through pip as the build backend.

Without meson-python installed, you should be able to build just fine doing something like

meson setup my-build
ninja -C my-build

This PR only checks meson-python version when it is installed, which is good enough (i.e. does not exactly differentiate between going through pip or using meson directly).

Copy link

github-actions bot commented Jul 29, 2024

✔️ Linting Passed

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

Generated for commit: f5b0449. 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.

I tested locally by uninstalling meson-python from my dev env while keeping meson and ninja installed and I can build successfully with meson / ninja (while it's not the case on main).

@betatim betatim merged commit 06eafd8 into scikit-learn:main Jul 30, 2024
30 checks passed
@betatim
Copy link
Member

betatim commented Jul 30, 2024

For my education, when would you not use pip/use meson directly?

@lesteve lesteve deleted the meson-python-not-required-when-using-meson-directly branch July 30, 2024 11:19
@lesteve
Copy link
Member Author

lesteve commented Jul 30, 2024

For my education, when would you not use pip/use meson directly?

pip is definitely the 99.9% use case. Sometimes it's convenient to do meson + ninja, for example to show the full compilation commands being run as in #28603 (comment). I am sure there is a way with pip passing the right flags that then gets passed then to ninja, but I find the syntax not easy to remember and not super convenient, you know the tool on top of tool effect 😉.

Edit: I ended up editing #28603 (comment) to add the way to use pip and pass -v to ninja ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants