projects.py: Disable superfluous invocations of projects.py

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-03-07 11:40:58 +00:00
commit fd2ca4f6ff

View file

@ -69,12 +69,17 @@ class Build(object):
def read_deps(self, cur, prereq_type): def read_deps(self, cur, prereq_type):
# dep cache doesn't make a difference at all # dep cache doesn't make a difference at all
projects_py="/usr/bin/python2 " + my_dir + "/projects.py --prefix " + projs_root + " " + os.getenv('PROJECTS_PY_EXTRA_ARGS', "")
if prereq_type in dep_cache: if prereq_type in dep_cache:
if cur in dep_cache[prereq_type]: if cur in dep_cache[prereq_type]:
return dep_cache[prereq_type][cur] return dep_cache[prereq_type][cur]
else: else:
dep_cache[prereq_type] = {} dep_cache[prereq_type] = {}
if True:
r = get_modules_from_project_txt(cur, 'pkg.requires.jw',
prereq_type, scope = 2, add_self=False, names_only=True)
else: # legacy
projects_py="/usr/bin/python2 " + my_dir + "/projects.py --prefix " + projs_root + " " + os.getenv('PROJECTS_PY_EXTRA_ARGS', "")
cmd = projects_py + " prereq " + prereq_type + " " + cur cmd = projects_py + " prereq " + prereq_type + " " + cur
debug('running', cmd) debug('running', cmd)
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)