Added support for tool.meson-python.env table in pyproject.toml#844
Added support for tool.meson-python.env table in pyproject.toml#844tobiasdiez wants to merge 1 commit intomesonbuild:mainfrom
tool.meson-python.env table in pyproject.toml#844Conversation
Co-authored-by: Copilot <copilot@github.com>
|
Why doesn't setting the |
|
Setting this in pyproject.toml implies that anyone who wants to use a different value must edit a source-controlled file, which feels a bit dubious. |
Since in some settings
Sure, you don't want to use it to set env variables that users/other devs likely need to modify. In this aspect, it's similar to the other meson config options that can be specified in |
|
I don't understand what you are trying to achieve. One one hand you say that using In general, encoding setup-specific configuration in the package metadata is not the right thing to do. And here it seems that you want to do precisely that. If in your setup you need to use Which, by the way, judging from the documentation, seems to be the recommended way to run |
|
I think I understand the motivation, however I agree that adding a I also checked |
I would like to have both of these scenarios work and use the system-provided dependencies: With pkgconf-pypi installed in the build venv: Without pgkconfig-pypi installed in the build venv: Sure, I can manually set For more details: the main package doesn't have any build requirement on pkgconf-pypi, but one of the tests is using it. So depending on whether the
A change in behavior in pkgconf-pypi would of course also address my issue, although I don't quite see how splitting the package would help.
I agree that there are not too many use cases. It would be helpful for external tools that are most conveniently controlled via env variables, or perhaps as a more streamlined interface to set different defaults for meson build options. Perhaps the closet feature in other projects is |
Well, there's two "modes" for the
Due to how build isolation works, it's not possible for You only want (2), so a new package that gives you a |
|
I think my problem is more that in case (1) pkg-config is not able to find system dependencies. I've opened pypackaging-native/pkgconf-pypi#110 to track this. Closing as I got the impression there is no desire to add the |
|
Thanks @tobiasdiez! I'll follow up on |
Adds an env table as config option in the users
pyproject.toml. Those environment variables are used for all Meson/Ninja subprocesses.This makes it possible to set a reproducible set of env variables accross all builds (inital + editable rebuild). In my case, this was triggered by the desire to set
FORCE_PKGCONF_PYPI.