-
Notifications
You must be signed in to change notification settings - Fork 77
ENH: add tool.meson-python.wheel.exclude setting #766
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
base: main
Are you sure you want to change the base?
Conversation
e61dd88
to
6b98023
Compare
Another idea I was toying with is to extend the filtering by meson install tags to allow to specify different tags per subproject. meson-python does not rely on the meson implementation of the filtering anyway, thus extending the facility is possible. |
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.
Thanks @dnicolodi! I like this. Agreed that these unmappable install locations/targets are a pain point, and this is a nice and ergonomic solution I think.
The wheel.exclude
name is good, and it matches the name in scikit-build-core which is helpful.
One question about using introspection metadata locations. I can see that working, but there's also an alternative of using wheel locations - I'm not quite sure which is better.
|
||
[tool.meson-python.wheel] | ||
# Meson versions before 1.3.0 install data files in {datadir}/{project name}/, | ||
# later versions install in the more correct {datadir}/{dubproject name}/ |
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.
typo dubproject
@@ -5,3 +5,8 @@ | |||
[build-system] | |||
build-backend = 'mesonpy' | |||
requires = ['meson-python'] | |||
|
|||
[tool.meson-python.wheel] | |||
# Meson versions before 1.3.0 install data files in {datadir}/{project name}/, |
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.
It'd be fine to support this for meson>=1.3.0 only I think.
That may still require changes to the subproject itself (e.g., there are multiple shared libraries and you need only one of them), so is less general. I prefer |
We could also consider implementing both |
I can see the appeal of that, yes. Especially on projects with lots of install targets, that seems nice. Although the cases where you can't make things concise with excluding install tags + This could be done immediately, or later if there's demand. Given this PR is very nice and clean, may be okay to add it immediately? |
I am not entirely sure we want to include this facility: it may potentially be abused when better solutions exist. However, I think it is better than the solution we currently recommend https://mesonbuild.com/meson-python/how-to-guides/shared-libraries.html#shared-library-from-subproject of adding specific options to subprojects to exclude this or that parts from the installation.