Commit c2af3951 authored by Sébastien Luttringer's avatar Sébastien Luttringer

remove run_setup and run_parser

parent eef5dc3d
......@@ -968,7 +968,10 @@ class PackageImage(Image):
# run parser scripts to extend extparser
# those scripts should only extand the parser or produce error
if run_parser:
self.run_parser({"parser": extparser})
lambda: self.select_scripts("parser"),
{"parser": extparser})
# call parser (again), with full options
arrow("Parsing command line")
# Catch exception in custom argparse action
......@@ -978,26 +981,13 @@ class PackageImage(Image):
raise ISError("Argument parser", e)
# run setup scripts
if run_setup:
self.run_setup({"namespace": args})
lambda: self.select_scripts("setup"),
{"namespace": args})
# return the building time
return int(time.time() - t0)
def run_parser(self, global_dict):
Run parser scripts
if global_dict is None:
global_dict = {}
self.run_scripts("parser", lambda: self.select_scripts("parser"), "/", global_dict)
def run_setup(self, global_dict=None):
Run setup scripts
if global_dict is None:
global_dict = {}
self.run_scripts("setup", lambda: self.select_scripts("setup"), "/", global_dict)
def select_scripts(self, directory):
Generator of tuples (fp,fn,fc) of scripts witch are allocatable
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment