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


Python Command.split方法代码示例

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


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

示例1: patched

# 需要导入模块: from rpg.command import Command [as 别名]
# 或者: from rpg.command.Command import split [as 别名]
 def patched(self, project_dir, spec, sack):
     """ Finds dependencies via makedepend - This is not garanteed to be
         all of them. Makedepend uses macro preprocessor and if it throws
         and error makedepend didn't print deps. """
     out = Command([
         "find " + path_to_str(project_dir) + " -name " +
         " -o -name ".join(
             ["'*." + ex + "'" for ex in self.EXT_CPP]
         )
     ]).execute()
     cc_makedep = ""
     cc_included_files = []
     for _f in out.splitlines():
         try:
             cc_makedep = Command("makedepend -w 1000 " + str(_f) +
                                  " -f- 2>/dev/null").execute()
         except CalledProcessError as e:
             logging.warn(str(e.cmd) + "\n" + str(e.output))
             continue
         cc_included_files += [
             s for s in cc_makedep.split()
             if (s.startswith("/usr") or s.startswith("/include"))
             and str(project_dir) not in s]
     spec.required_files.update(cc_included_files)
     spec.build_required_files.update(cc_included_files)
开发者ID:PavolVican,项目名称:rpg,代码行数:27,代码来源:c.py

示例2: build_srpm

# 需要导入模块: from rpg.command import Command [as 别名]
# 或者: from rpg.command.Command import split [as 别名]
 def build_srpm(spec_file, tarball, output_dir):
     """ Builds source rpm from spec and tarball and moves it to the
         output directory """
     Command("rpmdev-setuptree").execute()
     Command("cp " + path_to_str(tarball) +
             ' $(rpm --eval "%{_topdir}")/SOURCES').execute()
     output = Command("rpmbuild -bs " + path_to_str(spec_file)).execute()
     Command("mv " + path_to_str(output.split()[-1]) +
             " " + path_to_str(output_dir)).execute()
开发者ID:LukasSlouka,项目名称:rpg,代码行数:11,代码来源:package_builder.py

示例3: build_srpm

# 需要导入模块: from rpg.command import Command [as 别名]
# 或者: from rpg.command.Command import split [as 别名]
    def build_srpm(spec_file, tarball, output_dir):
        """builds RPM package with build_srpm and build_rpm"""

        # Build srpm pakcage from given spec_file and tarball
        Command("rpmdev-setuptree").execute()
        Command("cp " + path_to_str(tarball) +
                ' $(rpm --eval "%{_topdir}")/SOURCES').execute()
        output = Command("rpmbuild -bs " + path_to_str(spec_file)).execute()
        Command("mv " + path_to_str(output.split()[-1]) +
                " " + path_to_str(output_dir)).execute()
开发者ID:pan0007,项目名称:test,代码行数:12,代码来源:package_builder.py

示例4: patched

# 需要导入模块: from rpg.command import Command [as 别名]
# 或者: from rpg.command.Command import split [as 别名]
 def patched(self, project_dir, spec, sack):
     out = Command([
         "find " + path_to_str(project_dir) + " -name " +
         " -o -name ".join(
             ["'*." + ex + "'" for ex in self.EXT_CPP]
         )
     ]).execute()
     cc_makedep = ""
     cc_included_files = []
     for _f in out.splitlines():
         try:
             cc_makedep = Command("makedepend -w 1000 " + str(_f) +
                                  " -f- 2>/dev/null").execute()
         except CalledProcessError as e:
             logging.warn(str(e.cmd) + "\n" + str(e.output))
             continue
         cc_included_files += [
             s for s in cc_makedep.split()
             if (s.startswith("/usr") or s.startswith("/include"))
             and str(project_dir) not in s]
     spec.required_files.update(cc_included_files)
     spec.build_required_files.update(cc_included_files)
开发者ID:pan0007,项目名称:test,代码行数:24,代码来源:c.py


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