Commit graph

4 commits

Author SHA1 Message Date
9c06103a4a cmds.project.*: Make _run() async
Cmd._run(), as conceived for working with lib.App, is meant to be an
async method. To be conservative about changes, jw-pkg's legacy way
of handling _run() was kept when deriving from libApp, and async was
not propagated down to the _run() implementations. This commit
rectifies that before adding additional subcommands.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-28 17:41:10 +01:00
f175f9d5c9 lib.Cmd: Add argument "parent" to __init__()
During __init__(), commands have no idea of their parent. This is not
a problem as of now, but is easy to fix, and it's architecturally
desirable to be prepared just in case, so add the parent argument to
the ctor before more commands are added.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-28 15:24:24 +01:00
95fa2f0d06 jw.pkg.App: Remove .debug() and friends
Replace the jw.pkg.App.debug(), .warn() and .err() methods by the
global log() function. There's no obvious benefit in having App know
what's logged.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-26 17:58:23 +01:00
0b83c863a2 jw.build.cmds: Move build.cmds -> cmds.projects
Reorganize the Python module structure. Placing the command classes
under jw.cmds.projects instead of jw.build.cmds will allow to add a
nested command structure, with the current commands, being mostly
related to building software, found below a "projects" toplevel
command.

Other conceivable commands could be "package" for packaging, or
"distro" for commands wrapping the distribution's package manager.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-26 17:58:23 +01:00
Renamed from src/python/jw/pkg/build/cmds/BaseCmdPkgRelations.py (Browse further)