当前位置: 首页>>代码示例>>Python>>正文


Python Utils.run_in_dir方法代码示例

本文整理汇总了Python中utils.Utils.run_in_dir方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.run_in_dir方法的具体用法?Python Utils.run_in_dir怎么用?Python Utils.run_in_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在utils.Utils的用法示例。


在下文中一共展示了Utils.run_in_dir方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __gitTag

# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import run_in_dir [as 别名]
 def __gitTag(self, i, tagName):
     cmd = "git clone {url} {d}".format(url=i.url, d=shellquote(i.local_dir))
     tagCmd = "git checkout {tag}".format(tag=tagName)
     try:
         Utils.run(cmd)
         Utils.run_in_dir(tagCmd, i.local_dir)
     except:
         print "failed to clone from {url}".format(url=i.url)
         sys.exit(1)
开发者ID:nickjhathaway,项目名称:njhRInside,代码行数:11,代码来源:setup.py

示例2: __build

# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import run_in_dir [as 别名]
 def __build(self, i, cmd):
     print "\t Getting file..."
     fnp = Utils.get_file_if_size_diff(i.url, self.paths.ext_tars)
     Utils.clear_dir(i.build_dir)
     Utils.untar(fnp, i.build_dir)
     try:
         Utils.run_in_dir(cmd, i.build_sub_dir)
     except:
         #Utils.rm_rf(i.local_dir)
         sys.exit(1)
开发者ID:nickjhathaway,项目名称:njhRInside,代码行数:12,代码来源:setup.py

示例3: remakeNJHseqProject

# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import run_in_dir [as 别名]
 def remakeNJHseqProject(self, subProjectDir):
     makeCmd = ""
     cmd =   """
             if [ -f .git ]; then git pull; fi
             && if [ -f .gitmodules ]; then git submodule init && git submodule update; fi
             && ./configure.py -externalLibDir {EXT_LOC} 
             && ./setup.py --compfile compfile.mk --outMakefile makefile-common.mk --overWrite  
             && make clean && make -j {NUMCORES} 
             && if [ -d $(make printInstallDir) ]; then rm -rf $(make printInstallDir); fi
             && mkdir -p $(make printInstallDir)
             && make -j {NUMCORES} install""".format(EXT_LOC = self.externalLoc, NUMCORES = self.numCores)
     cmd = cmd + makeCmd
     cmd = " ".join(cmd.split())
     Utils.run_in_dir(cmd, subProjectDir)
开发者ID:bailey-lab,项目名称:SeekDeep,代码行数:16,代码来源:ProjectUpdater.py

示例4: __buildFromGitTag

# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import run_in_dir [as 别名]
 def __buildFromGitTag(self, i, cmd, tagName):
     if os.path.exists(i.build_dir):
         print "pulling from {url}".format(url=i.url)
         pCmd = "git checkout master && git pull && git checkout " + tagName
         try:
             Utils.run_in_dir(pCmd, i.build_dir)
         except:
             print "failed to pull from {url}".format(url=i.url)
             sys.exit(1)
     else:
         print "cloning from {url}".format(url=i.url)
         cCmd = "git clone {url} {d}".format(url=i.url, d=i.build_dir)
         tagCmd = "git checkout {tag}".format(tag=tagName)
         try:
             print self.paths.ext_build
             Utils.run_in_dir(cCmd, self.paths.ext_build)
             Utils.run_in_dir(tagCmd, i.build_dir)
         except:
             print "failed to clone from {url}".format(url=i.url)
             sys.exit(1)
     try:
         Utils.run_in_dir(cmd, i.build_dir)
     except:
         Utils.rm_rf(i.local_dir)
         sys.exit(1)
开发者ID:nickjhathaway,项目名称:njhRInside,代码行数:27,代码来源:setup.py

示例5: __buildFromGitBranch

# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import run_in_dir [as 别名]
 def __buildFromGitBranch(self, i, cmd, branchName):
     if os.path.exists(i.build_dir):
         print "pulling from {url}".format(url=i.url)
         pCmd = "git checkout " + branchName + " && git pull"
         try:
             Utils.run_in_dir(pCmd, i.build_dir)
         except:
             print "failed to pull from {url} with {cmd}".format(url=i.url, cmd = pCmd)
             sys.exit(1)
     else:
         print "cloning from {url}".format(url=i.url)
         cCmd = "git clone -b "+ branchName + " {url} {d}".format(url=i.url, d=i.build_dir)
         try:
             print self.paths.ext_build
             Utils.run_in_dir(cCmd, self.paths.ext_build)
         except:
             print "failed to clone from {url}".format(url=i.url)
             sys.exit(1)
     try:
         Utils.run_in_dir(cmd, i.build_dir)
     except:
         Utils.rm_rf(i.local_dir)
         sys.exit(1)
开发者ID:nickjhathaway,项目名称:njhRInside,代码行数:25,代码来源:setup.py

示例6: __buildFromGit

# 需要导入模块: from utils import Utils [as 别名]
# 或者: from utils.Utils import run_in_dir [as 别名]
 def __buildFromGit(self, i, cmd):
     if os.path.exists(i.build_dir):
         print "pulling from {url}".format(url=i.url)
         pCmd = "git pull"
         try:
             Utils.run_in_dir(pCmd, i.build_dir)
         except:
             print "failed to pull from {url}".format(url=i.url)
             sys.exit(1)
     else:
         print "cloning from {url}".format(url=i.url)
         cCmd = "git clone {url} {d}".format(url=i.url, d=i.build_dir)
         try:
             print self.paths.ext_build
             Utils.run_in_dir(cCmd, self.paths.ext_build)
         except:
             print "failed to clone from {url}".format(url=i.url)
             sys.exit(1)
     try:
         Utils.run_in_dir(cmd, i.build_dir)
     except:
         Utils.rm_rf(i.local_dir)
         sys.exit(1)
开发者ID:nickjhathaway,项目名称:psTestCase,代码行数:25,代码来源:setup.py


注:本文中的utils.Utils.run_in_dir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。