def vcsUpdate(self, options, vcs_dir): self.verificateCLBuild() clbuild = self.getCLBuildPath() runProgram(self.getManager(), [clbuild, "update", "--no-dependencies", vcs_dir]) self.updateCLBuildProjectsDB() return True
def vcsCheckOutOrUpdate(self, options, *pkg_name): "'install' command" self.verificateCLBuild() # just call install command clbuild = self.getCLBuildPath() runProgram(self.getManager(), [clbuild, "install"] + list(pkg_name)) self.updateCLBuildProjectsDB() return True
def vcsCheckOut(self, options, uri, vcs_dir): runProgram(self.getManager(), [self.vcsProgramName(), self.vcsCheckOutCommand(), uri, vcs_dir]) # add it into project db proj = self.getManager().getPlugin("project") proj.addProject(None, vcs_dir, self.getPluginName(), {"uri": uri}) return True
def compileCLBuildSBCL(self): # first of all, check out sbcl self.debugPrint("checking out sbcl") self.vcsCheckOutOrUpdate(None, "sbcl") clbuild = self.getCLBuildPath() try: runProgram(self.getManager(), [clbuild, "compile-implementation", "sbcl"]) except CalledProcessError, e: print "ignoring error => %s" % (e)
def vcsCheckOut(self, uri, module_name, cvs_dir): self.debugPrint("checkout %s" % (module_name)) # cvs_dir: absolute path -> relative path pwd = os.getcwd() try: chdir = os.path.dirname(cvs_dir) os.chdir(chdir) current_dir = os.getcwd() runProgram(self.getManager(), ["cvs", "-z3", "-d", uri, "co", "-d", os.path.basename(cvs_dir), module_name]) finally: os.chdir(pwd) proj = self.getManager().getPlugin("project") proj.addProject(None, cvs_dir, self.getPluginName(), {"uri": uri, "module": module_name}) return True
def installBinarySBCLDarwin(self): # Download SBCL Binary for Darwin pwd = os.getcwd() try: os.chdir(CLBUILD_DIR) manager = self.getManager() self.debugPrint("downloading sbcl from %s" % (SBCL_DARWIN_URI)) runProgram(manager, ["wget", "-q", SBCL_DARWIN_URI, "-O", SBCL_DARWIN_TARBALL]) self.debugPrint("unboxing sbcl: %s" % (SBCL_DARWIN_TARBALL)) runProgram(manager, ["tar", "xjf", SBCL_DARWIN_TARBALL]) # add src/runtime into PATH sbcl_path = os.path.join(CLBUILD_DIR, SBCL_DARWIN_DIR, "src", "runtime") self.debugPrint("updating PATH") os.environ["PATH"] = os.environ["PATH"] + ":" + sbcl_path finally: os.chdir(pwd) return True
def vcsUpdate(self, options, vcs_dir): proj = self.getManager().getPlugin("project") project = proj.findProject(vcs_dir) if project: vcs_full_dir = proj.getProjectFullPath(project["path"]) else: vcs_full_dir = os.path.join(self.getDefaultRootDirectory(), vcs_dir) return runProgram(self.getManager(), [self.vcsProgramName(), self.vcsUpdateCommand(), vcs_full_dir])
def vcsUpdate(self, options, vcs_dir): proj = self.getManager().getPlugin("project") project = proj.findProject(vcs_dir) if project: vcs_full_dir = proj.getProjectFullPath(project["path"]) else: vcs_full_dir = os.path.join(self.getDefaultRootDirectory(), vcs_dir) pwd = os.getcwd() try: self.debugPrint("%s -> %s" % (pwd, vcs_full_dir)) os.chdir(vcs_full_dir) return runProgram(self.getManager(), [self.vcsProgramName(), self.vcsUpdateCommand()]) finally: os.chdir(pwd)
def vcsUpdate(self, options, cvs_dir): self.debugPrint("estimating cvs_dir: %s" % (cvs_dir)) proj = self.getManager().getPlugin("project") project = proj.findProject(cvs_dir) if project: cvs_full_dir = proj.getProjectFullPath(project["path"]) else: cvs_full_dir = os.path.join(self.getDefaultRootDirectory(), cvs_dir) self.debugPrint("update %s" % (cvs_full_dir)) if os.path.exists(cvs_full_dir): pwd = os.getcwd() try: os.chdir(cvs_full_dir) return runProgram(self.getManager(), ["cvs", "update"]) finally: os.chdir(pwd) else: self.debugPrint("No such file or directory: %s" % cvs_full_dir)
def updateProjects(self, options): clbuild = self.getCLBuildPath() projects = self.getCLBuildProjects() # TODO: use DB runProgram(self.getManager(), [clbuild, "update"] + projects) return True
def invokeLisp(self, options): clbuild = self.getCLBuildPath() return runProgram(self.getManager(), [clbuild, "lisp"])
def update(self, packages): cmd = ["sudo", "easy_install", "-U"] + packages return runProgram(self.getManager(), cmd)
def update(self, packages): cmd = ["sudo", "port", "upgrade"] + packages return runProgram(self.getManager(), cmd)
def install(self, packages): cmd = ["sudo", "port", "install"] + packages return runProgram(self.getManager(), cmd)