mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-27 07:33:54 +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:
|
if add_self:
|
||||||
buf.append(spec)
|
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):
|
names_only = True):
|
||||||
|
if isinstance(keys, basestring):
|
||||||
|
keys = [ keys ]
|
||||||
#r = Set()
|
#r = Set()
|
||||||
r = []
|
r = []
|
||||||
|
for key in keys:
|
||||||
visited = Set()
|
visited = Set()
|
||||||
for name in names:
|
for name in names:
|
||||||
add_modules_from_project_txt(r, visited, name, section, key, add_self, scope,
|
rr = []
|
||||||
|
add_modules_from_project_txt(rr, visited, name, section, key, add_self, scope,
|
||||||
names_only)
|
names_only)
|
||||||
|
# TODO: this looks like a performance hogger
|
||||||
|
for m in rr:
|
||||||
|
if not m in r:
|
||||||
|
r.append(m)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
def get_libname(names):
|
def get_libname(names):
|
||||||
|
|
@ -213,7 +221,7 @@ def cmd_ldlibpath(args_):
|
||||||
parser = argparse.ArgumentParser(description='ldlibpath')
|
parser = argparse.ArgumentParser(description='ldlibpath')
|
||||||
parser.add_argument('module', nargs='*', help='Modules')
|
parser.add_argument('module', nargs='*', help='Modules')
|
||||||
args=parser.parse_args(args_)
|
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)
|
scope = 2, add_self=True, names_only=True)
|
||||||
r = ''
|
r = ''
|
||||||
for m in deps:
|
for m in deps:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue