Commit graph

8 commits

Author SHA1 Message Date
150bc97fc9 build.lib.util, build.App: Beautify exceptions

Make exceptions somewhat more readable.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 10:44:14 +01:00
a863bb9747 jw.build.App: Unroll run_from_cmd_module()

run_from_cmd_module() is a helper function used to allow command selection alongside the legacy and now obsolete method. Unrolling it is a step towards adding proper argparse subparsers, so do that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:42:16 +01:00
75820eee7c jw.build.App: Fix commands missing from help message

jw-projects.py --help doesn't list the commands, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:41:28 +01:00
2a67708fb1 build.cmds.BaseCmdPkgRelations: Add Module

For requires, provides and conflicts, isolate the bulk of the code in BaseCmdPkgRelations, then derive CmdPkgConflicts, CmdPkgProvides and CmdPkgRequires from that class.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-16 18:05:10 +01:00
3370dd6236 build.App: Remove some cruft

Remove code

- Explicitly marked as unused - Meant to provide Python2 compatibility - Meant to run App.py as main module - Turned obsolete by removing the command functions from Projects.py
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-16 14:26:03 +01:00
ac583f76e1 build.cmds: Move build.App.cmd_xxx() here

For every cmd_xxx() method in build.App, create a class that's instatiated for running the respective command. This has the advantage of making App.py smaller (and faster), and having smaller, more maintainable command modules adhering to a common interface.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-16 11:39:27 +01:00
17bf98cb7a build.Cmd: Add module

Cmd is meant as a base class for classes representing commands currently still implemented as methods of the Project class.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-15 14:41:07 +01:00
aa3e2efd84 projects.py: Move bulk of code into module

Move nearly all of projects.py into src/python/jw/build/App.py. The plan is to split the script into parts and import them.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-15 11:08:52 +01:00