mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
projects.py: Use both pkg.required.build and pkg.required.run for ldlibpath
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c6d261323f
commit
cca008ac3b
1 changed files with 14 additions and 6 deletions
|
|
@ -139,14 +139,22 @@ def add_modules_from_project_txt(buf, visited, spec, section, key, add_self, sco
|
|||
if add_self:
|
||||
buf.append(spec)
|
||||
|
||||
def get_modules_from_project_txt(names, section, key, add_self, scope,
|
||||
def get_modules_from_project_txt(names, section, keys, add_self, scope,
|
||||
names_only = True):
|
||||
if isinstance(keys, basestring):
|
||||
keys = [ keys ]
|
||||
#r = Set()
|
||||
r = []
|
||||
visited = Set()
|
||||
for name in names:
|
||||
add_modules_from_project_txt(r, visited, name, section, key, add_self, scope,
|
||||
names_only)
|
||||
for key in keys:
|
||||
visited = Set()
|
||||
for name in names:
|
||||
rr = []
|
||||
add_modules_from_project_txt(rr, visited, name, section, key, add_self, scope,
|
||||
names_only)
|
||||
# TODO: this looks like a performance hogger
|
||||
for m in rr:
|
||||
if not m in r:
|
||||
r.append(m)
|
||||
return r
|
||||
|
||||
def get_libname(names):
|
||||
|
|
@ -213,7 +221,7 @@ def cmd_ldlibpath(args_):
|
|||
parser = argparse.ArgumentParser(description='ldlibpath')
|
||||
parser.add_argument('module', nargs='*', help='Modules')
|
||||
args=parser.parse_args(args_)
|
||||
deps = get_modules_from_project_txt(args.module, 'pkg.required', 'run',
|
||||
deps = get_modules_from_project_txt(args.module, 'pkg.required', [ 'run', 'build' ],
|
||||
scope = 2, add_self=True, names_only=True)
|
||||
r = ''
|
||||
for m in deps:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue