示例#1
0
文件: tpl_tasks.py 项目: dagss/Bento
    def build(self, name, sources, env=None):
        sources = [self.ctx.src_root.find_resource(s) for s in sources]
        task_gen = TaskGen("template", self.ctx, sources, name)
        task_gen.env = _merge_env(self.env, env)
        tasks = task_gen.process()
        for t in tasks:
            t.env = task_gen.env
        self.ctx.tasks.extend(tasks)

        outputs = tasks[0].outputs[:]
        return outputs
示例#2
0
文件: __init__.py 项目: B-Rich/Bento
    def _task_gen_factory(self, name, target, sources, env):
        sources = self.to_nodes(sources)

        task_gen = TaskGen(name, self.ctx, sources, target)
        task_gen.env = _merge_env(self.env, env)
        tasks = task_gen.process()
        for t in tasks:
            t.env = task_gen.env
        self.ctx.tasks.extend(tasks)

        outputs = tasks[0].outputs[:]
        return outputs