Possibility to include subprojects in sdist
Is it already possible to include subprojects when building an sdist using this build backend?
Currently I'm exploiting that meson dist will capture the complete repository and add the subprojects with git subtree add --prefix subprojects/dep1 https://github.com/.../dep1 HEAD before running the sdist build.
Hum, I think we should be doing that, since our sdist is derived from meson dist. We will need to check.
I think you need meson dist --include-subprojects for this purpose.
I think this is solved by the recent added capability of passing command line options to Meson. I think this should work:
python -m build -s -Ddist-args=--include-subprojects
or probably better included in the project pyproject.toml:
[tool.meson-python]
args.dist="--include-subprojects"
@awvwgk can you check if this works for you? You need meson-python >= 0.11.0 for this.
I admit that the UI for passing command line options to Meson is just terrible. And this was the reason why I would have liked the documentation to be written before a release with this functionality was released. I know we are constrained by what pep517 (does not) specify and what the implementations do, but at least some consistency would have been nice.
Why do we use the dist-args on the command line but args.dist in pyproject.toml? Wouldn't it have been better to use args-dist on command line? Heck, we could have even used dist.args using the dot as a "namespace separator" in the command line too.
Also, why isn't the pyproject.toml table entry called meson.dist.args? It makes a ton more sense to me for it to be called that way.
This is solved by the support for passing arguments to meson dist.