mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
projects.py: Add support for command pythonpath
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
82c41cd68d
commit
3ec49304a1
1 changed files with 15 additions and 0 deletions
|
|
@ -365,6 +365,21 @@ def cmd_ldlibpath(args_):
|
||||||
r = r + ':' + proj_dir(m) + '/lib'
|
r = r + ':' + proj_dir(m) + '/lib'
|
||||||
print(r[1:])
|
print(r[1:])
|
||||||
|
|
||||||
|
def cmd_pythonpath(args_):
|
||||||
|
parser = argparse.ArgumentParser(description='pythonpath')
|
||||||
|
parser.add_argument('module', nargs='*', help='Modules')
|
||||||
|
args=parser.parse_args(args_)
|
||||||
|
deps = get_modules_from_project_txt(args.module, 'pkg.requires.jw', [ 'run', 'build' ],
|
||||||
|
scope = 2, add_self=True, names_only=True)
|
||||||
|
r = ''
|
||||||
|
for m in deps:
|
||||||
|
pdir = proj_dir(m)
|
||||||
|
for subdir in [ 'src/python', 'tools/python' ]:
|
||||||
|
cand = pdir + "/" + subdir
|
||||||
|
if isdir(cand):
|
||||||
|
r = r + ':' + cand
|
||||||
|
print(r[1:])
|
||||||
|
|
||||||
def cmd_exepath(args_):
|
def cmd_exepath(args_):
|
||||||
parser = argparse.ArgumentParser(description='exepath')
|
parser = argparse.ArgumentParser(description='exepath')
|
||||||
parser.add_argument('module', nargs='*', help='Modules')
|
parser.add_argument('module', nargs='*', help='Modules')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue