mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-28 11:25:23 +02:00
jw.pkg.App.get_modules_from_project_txt(): Add Scope
Add the Enum "Scope" to denote the scope argument of jw.pkg.App.get_modules_from_project_txt(), because it explains itself better than an integer. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
bf4834085e
commit
f6ed191d73
11 changed files with 36 additions and 24 deletions
|
|
@ -3,6 +3,7 @@
|
|||
from argparse import Namespace, ArgumentParser
|
||||
|
||||
from ..Cmd import Cmd
|
||||
from ...App import Scope
|
||||
|
||||
# TODO: seems at least partly redundant to CmdPkgRequires / print_pkg_relations
|
||||
class CmdPrereq(Cmd): # export
|
||||
|
|
@ -17,5 +18,5 @@ class CmdPrereq(Cmd): # export
|
|||
|
||||
def _run(self, args: Namespace) -> None:
|
||||
deps = self.app.get_modules_from_project_txt(args.module, ['pkg.requires.jw'],
|
||||
args.flavour, scope = 2, add_self=False, names_only=True)
|
||||
args.flavour, scope = Scope.Subtree, add_self=False, names_only=True)
|
||||
print(' '.join(deps))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue