def install_blloader(cfg): bob_package.installPackage(cfg, "learning/bolero/src/bl_loader", ["-DPYTHON_SUPPORT=OFF"])
def install_(): global cfg layout_packages = [] cfg["update"] = False if len(sys.argv) < 3: buildconf.fetchPackages(cfg, layout_packages) else: buildconf.fetchPackage(cfg, sys.argv[2], layout_packages) deps = [] checked = [] if cfg["checkDeps"]: for p in layout_packages: bob_package.getDeps(cfg, p, deps, checked) #print deps toInstall = [] for d in deps[::-1]: if d not in toInstall: toInstall.append(d) for p in layout_packages: if p not in toInstall: toInstall.append(p) while len(toInstall) > 0: threads = [] jobs = [] iList = list(toInstall) toInstall = [] for p in iList: wait = False #c.printWarning(str(cfg["deps"][p])) if p in cfg["deps"]: for d in cfg["deps"][p]: if d in iList: wait = True break if not wait: jobs.append(p) if p in cfg["overrides"] and "install" in cfg["overrides"][p]: if cfg["multiprocessing"]: threads.append(Thread(target=cfg["overrides"][p]["install"], args=(cfg,))) else: c.printNormal("Install: "+p) le = len(cfg["errors"]) cfg["overrides"][p]["install"](cfg) if len(cfg["errors"]) <= le: c.printWarning("done") else: c.printError("error") elif p in cfg["osdeps"]: # os deps are installed in fetch phase continue else: if cfg["multiprocessing"]: threads.append(Thread(target=bob_package.installPackage, args=(cfg, p))) else: c.printNormal("Install: "+p) le = len(cfg["errors"]) bob_package.installPackage(cfg, p) if len(cfg["errors"]) <= le: c.printWarning("done") else: c.printError("error") else: toInstall.append(p) if cfg["multiprocessing"]: c.printBold("Install: "+str(jobs)) le = len(cfg["errors"]) for t in threads: t.start() for t in threads: t.join() if len(cfg["errors"]) > le: foo = ""
def install_kdl(cfg): bob_package.installPackage(cfg, "control/kdl/orocos_kdl")
def install_(): global cfg layout_packages = [] cfg["update"] = False filterArgs = ["-n", "-k"] if len(sys.argv) < 3 or sys.argv[2] in filterArgs: # search path upwards for a manifest.xml # if not found build manifest from buildconf pathToCheck = os.getcwd() found = False done = False while not done: if os.path.isfile(pathToCheck + "/manifest.xml"): found = True done = True elif os.path.exists(pathToCheck + "/autoproj"): # found dev root done = True else: arrPath = pathToCheck.split("/") if len(arrPath) == 1: done = True else: pathToCheck = "/".join(arrPath[:-1]) if found: layout_packages.append(os.path.relpath(pathToCheck, cfg["devDir"])) else: buildconf.fetchPackages(cfg, layout_packages) else: pathToCheck = os.path.join(os.getcwd(), sys.argv[2]) if os.path.isfile(pathToCheck + "/manifest.xml"): layout_packages.append(os.path.relpath(pathToCheck, cfg["devDir"])) else: buildconf.fetchPackage(cfg, sys.argv[2], layout_packages) deps = [] checked = [] if cfg["checkDeps"]: for p in layout_packages: bob_package.getDeps(cfg, p, deps, checked) toInstall = [] for d in deps[::-1]: if d not in toInstall: toInstall.append(d) for p in layout_packages: if p not in toInstall: toInstall.append(p) iList = [] while len(toInstall) > 0: threads = [] jobs = [] oldList = iList iList = list(toInstall) if oldList == iList: # detect unresolved deps loop for p in oldList: c.printError("detect dependency cycle:\n " + str(p)) c.printWarning(" deps:") if p in cfg["deps"]: for d in cfg["deps"][p]: if d in iList: c.printWarning(" - " + str(d)) exit(-1) toInstall = [] for p in iList: wait = False if p in cfg["deps"]: for d in cfg["deps"][p]: if d in iList: wait = True break if not wait: jobs.append(p) if p in cfg["overrides"] and "install" in cfg["overrides"][p]: if cfg["multiprocessing"]: threads.append( Thread(target=cfg["overrides"][p]["install"], args=(cfg, ))) else: c.printNormal("Install: " + p) le = len(cfg["errors"]) cfg["overrides"][p]["install"](cfg) if len(cfg["errors"]) <= le: c.printWarning("done") else: c.printError("error") elif p in cfg["osdeps"]: # os deps are installed in fetch phase continue else: if cfg["multiprocessing"]: threads.append( Thread(target=bob_package.installPackage, args=(cfg, p))) else: c.printNormal("Install: " + p) le = len(cfg["errors"]) bob_package.installPackage(cfg, p) if len(cfg["errors"]) <= le: c.printWarning("done") else: c.printError("error") else: toInstall.append(p) if cfg["multiprocessing"]: c.printBold("Install: " + str(jobs)) le = len(cfg["errors"]) for t in threads: t.start() for t in threads: t.join() if len(cfg["errors"]) > le: foo = ""