Example #1
0
 def setup(self):
     if not self.attr_exists("setup_done"):
         self.manager = None
         self.setup_done = True
         if self.attr_exists("path") and (self.path == "cc"):
             self.root = Main.cc
         elif not (self.attr_exists("path") and self.path == "full"):
             self.root = os.path.join(Main.root, self.root)
         else:
             # self.root is full path
             pass
         if self.attr_exists("general"):
             self.general = self.general
         else:
             self.general = False
         self.set_default("build", None)
         # global buildregistry
         # if self.attr_exists("build"):
         #    self.build = buildregistry[self.build](self)
         if os.path.isdir(os.path.join(self.root, ".git")):
             self.git = git_mgr.GitManager(self.root)
         else:
             self.git = None
         if self.attr_exists("compiler"):
             self.compiler_cfg = self.object_config_lookup(
                 "Software", self.compiler)
         #if self.attr_exists("binary"):
         #    self.binary = self.root + self.binary
         self.root = os.path.join(Main.root, self.root)
 def __init__(self, name, cfg, init=True):
     if init:
         for a in ['uptodate', 'targets', 'actions']:
             if not hasattr(self, a):
                 setattr(self, a, [])
         self.basename = cfg.name
         self.name = name
         self.file_dep = []
         self.task_dep = []
         self.other = []
         self.build_cfg = cfg
         self.root_dir = self.gf('root')
         if os.path.isdir(os.path.join(self.root_dir, ".git")):
             self.git = git_mgr.GitManager(self.root_dir)
         else:
             self.git = None
    def __init__(self, cfg, always_uptodate):
        self.build_cfg = cfg
        self.basename = cfg.name
        self.always_uptodate = always_uptodate
        self.root_dir = self.build_cfg.root
        if os.path.isdir(os.path.join(self.root_dir, ".git")):
            self.git = git_mgr.GitManager(self.root_dir)
        else:
            self.git = None
        self.clean = CodeTaskClean(cfg)
        self.config = CodeTaskConfig(cfg)
        self.build = CodeTaskBuild(cfg)
        self.tasks = [self.clean, self.config, self.build]

        if always_uptodate:
            for t in self.tasks:
                t.uptodate = [True]
Example #4
0
    def setup(self):
        if not self.attr_exists("setup_done"):
            self.manager = None
            self.setup_done = True
            self.root = self.populate_path_from_name("root", False, False,
                                                     True)
            self._update_raw("root", self.root)
            if os.path.isdir(os.path.join(self.root, ".git")):
                self.git = git_mgr.GitManager(self.root)
            else:
                self.git = None
            map(lambda x: self.value_or_default(x, True), ["build"])
            if self.build:
                map(lambda x: self.value_or_default(x, True),
                    ["compiler", "build_prepare", "build_cmd", "clean"])

            self.basename = self.name
            self.populate_path_from_name("compiler",
                                         optional=True,
                                         do_setattr=True)
            if not self._files:
                self._update_raw("Files", {})