cmds.projects.CmdBuild: Add --pkg-relations

The relations the build closure of projects build follows are hard-coded in
read_deps(): [pkg.requires.jw] only. A workspace that also wants to build
the projects its seeds recommend in [pkg.recommends.jw] has no way to say
so.

Add a --pkg-relations option that lists the relations between jw packages
to take into consideration for the build, comma or space separated,
defaulting to requires.

Signed-off-by: Jan Lindemann <jan@janware.com>
Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.86.1
This commit is contained in:
Jan Lindemann 2026-09-21 05:34:47 +02:00
commit 5f98de8f5a
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
2 changed files with 26 additions and 7 deletions

View file

@ -256,7 +256,8 @@ Available subcommands of projects:
tmpl-dir Print directory containing templates of a given module
============= Running: jw-pkg.py -t ../../../.. --log-level info projects build --help
usage: jw-pkg.py projects build [-h] [--exclude EXCLUDE] [-n] [-O] [-I]
[--dep-flavours DEP_FLAVOURS] [--env-reinit]
[--dep-flavours DEP_FLAVOURS]
[--pkg-relations PKG_RELATIONS] [--env-reinit]
[--env-keep ENV_KEEP]
target modules [modules ...]
@ -279,6 +280,10 @@ options:
--dep-flavours DEP_FLAVOURS
Dependency flavours to take into consideration for
build, comma or space separated (default: auto)
--pkg-relations PKG_RELATIONS
Relations between packages to take into consideration
for build, comma or space separated (default:
requires)
--env-reinit Source /etc/profile before each build step. Discard
environment unless --env-keep is specified (default:
False)