Skip to content
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

Amend documentation to reflect that meson install is not run #473

Open
dnicolodi opened this issue Sep 2, 2023 · 6 comments
Open

Amend documentation to reflect that meson install is not run #473

dnicolodi opened this issue Sep 2, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@dnicolodi
Copy link
Member

Amend the documentation to reflect the fact that we don't actually run meson install but just re-implement it. This affects two Meson features: install_rpath support, and running scripts registered with meson.add_install_script(). Both things have no effect when building a package with meson-python.

@dnicolodi
Copy link
Member Author

Also explicitly list the meson install options recognized by meson-python in https://meson-python.readthedocs.io/en/latest/reference/pyproject-settings.html#cmdoption-arg-tool.meson-python.args.install and https://meson-python.readthedocs.io/en/latest/reference/config-settings.html#cmdoption-arg-install-args or find a way to do not have to repeat the content twice.

Most of the meson install options not handled by meson-python aren't relevant, but it's possible --strip may be or some new option gets added to meson install that we must start handling.

@FFY00
Copy link
Member

FFY00 commented Mar 30, 2025

I ran into this today, where I explicitly needed to perform some artifact fixup that was not possible any other sane way in meson other than using meson.add_install_script().

@dnicolodi
Copy link
Member Author

@FFY00 AFAIK the only feature offered to a script executed as a meson.add_install_script() vs a script executed as a custom_target() is the knowledge of the installation location via environment variables like MESON_INSTALL_PREFIX and MESON_INSTALL_DESTDIR_PREFIX. The installation path is hard to define for packages installed as wheels. Therefore, I am not able to imagine what requirement makes an installation script the right solution. Can you explain your use case in more detail?

@eli-schwartz
Copy link
Member

Stuff like auditwheel repair, maybe?

@FFY00
Copy link
Member

FFY00 commented Apr 2, 2025

Stuff like auditwheel repair, maybe?

Yes, exactly. In my particular case, I needed to perform a small edit to the binary format data of certain artifacts.

This is not possible in Meson AFAIK, as you can't pass a build target as the input for a custom target,

@dnicolodi
Copy link
Member Author

The Meson documentation is not very clear on this, but you can pass the object returned by build_target() as input to a custom_target().

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

No branches or pull requests

3 participants