Exemple #1
0
 def vcsUpdate(self, options, vcs_dir):
     self.verificateCLBuild()
     clbuild = self.getCLBuildPath()
     runProgram(self.getManager(), [clbuild, "update", "--no-dependencies",
                                    vcs_dir])
     self.updateCLBuildProjectsDB()
     return True
Exemple #2
0
 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
Exemple #3
0
 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
Exemple #4
0
 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)
Exemple #5
0
 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
Exemple #6
0
 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
Exemple #7
0
 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])
Exemple #8
0
 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)
Exemple #9
0
 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)
Exemple #10
0
 def updateProjects(self, options):
     clbuild = self.getCLBuildPath()
     projects = self.getCLBuildProjects() # TODO: use DB
     runProgram(self.getManager(), [clbuild, "update"] + projects)
     return True
Exemple #11
0
 def invokeLisp(self, options):
     clbuild = self.getCLBuildPath()
     return runProgram(self.getManager(), [clbuild, "lisp"])
Exemple #12
0
 def update(self, packages):
     cmd = ["sudo", "easy_install", "-U"] + packages
     return runProgram(self.getManager(), cmd)
Exemple #13
0
 def update(self, packages):
     cmd = ["sudo", "port", "upgrade"] + packages
     return runProgram(self.getManager(), cmd)
Exemple #14
0
 def install(self, packages):
     cmd = ["sudo", "port", "install"] + packages
     return runProgram(self.getManager(), cmd)