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


Python util.execute方法代码示例

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


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

示例1: run

# 需要导入模块: from distutils import util [as 别名]
# 或者: from distutils.util import execute [as 别名]
def run(self):
        if not (os.system('pip show capstone') == 0):
            os.system('pip install git+https://github.com/aquynh/capstone@next#subdirectory=bindings/python')
        build_py.run(self)


# class PkgInstall(install_lib):
#     def run(self):
#         install_lib.run(self)
#         pth = os.path.dirname(os.path.realpath(__file__))
#         img = os.path.join(pth, 'fiddle/hw_info/bbxm/beagleboard-xm-orig.img')

#         os.system("cp %s %s" % (img, os.path.join(self.install_base,"fiddle/hw_info/bbxm/")))



# I'm guessing the following block of commented-out code is not a kosher
# way of installing capstone...
# execute(os.system, ('git clone https://github.com/aquynh/capstone',))
# execute(os.system, ('cd capstone; git checkout -b next',))
# os.environ['PREFIX'] = sys.prefix
# execute(os.system, ('cd capstone; ./make.sh',))
# execute(os.system, ('cd capstone; ./make.sh install',)) 
开发者ID:bx,项目名称:bootloader_instrumentation_suite,代码行数:25,代码来源:setup.py

示例2: execute

# 需要导入模块: from distutils import util [as 别名]
# 或者: from distutils.util import execute [as 别名]
def execute(self, func, args, msg=None, level=1):
        util.execute(func, args, msg, dry_run=self.dry_run) 
开发者ID:glmcdona,项目名称:meddle,代码行数:4,代码来源:cmd.py

示例3: make_file

# 需要导入模块: from distutils import util [as 别名]
# 或者: from distutils.util import execute [as 别名]
def make_file(self, infiles, outfile, func, args,
                  exec_msg=None, skip_msg=None, level=1):
        """Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        """
        if skip_msg is None:
            skip_msg = "skipping %s (inputs unchanged)" % outfile

        # Allow 'infiles' to be a single string
        if isinstance(infiles, str):
            infiles = (infiles,)
        elif not isinstance(infiles, (list, tuple)):
            raise TypeError, \
                  "'infiles' must be a string, or a list or tuple of strings"

        if exec_msg is None:
            exec_msg = "generating %s from %s" % \
                       (outfile, ', '.join(infiles))

        # If 'outfile' must be regenerated (either because it doesn't
        # exist, is out-of-date, or the 'force' flag is true) then
        # perform the action that presumably regenerates it
        if self.force or dep_util.newer_group(infiles, outfile):
            self.execute(func, args, exec_msg, level)

        # Otherwise, print the "skip" message
        else:
            log.debug(skip_msg)

# XXX 'install_misc' class not currently used -- it was the base class for
# both 'install_scripts' and 'install_data', but they outgrew it.  It might
# still be useful for 'install_headers', though, so I'm keeping it around
# for the time being. 
开发者ID:glmcdona,项目名称:meddle,代码行数:40,代码来源:cmd.py

示例4: execute

# 需要导入模块: from distutils import util [as 别名]
# 或者: from distutils.util import execute [as 别名]
def execute(self, func, args, msg=None, level=1):
        execute(func, args, msg, self.dry_run) 
开发者ID:glmcdona,项目名称:meddle,代码行数:4,代码来源:ccompiler.py

示例5: make_file

# 需要导入模块: from distutils import util [as 别名]
# 或者: from distutils.util import execute [as 别名]
def make_file(self, infiles, outfile, func, args,
                  exec_msg=None, skip_msg=None, level=1):
        """Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        """
        if skip_msg is None:
            skip_msg = "skipping %s (inputs unchanged)" % outfile

        # Allow 'infiles' to be a single string
        if isinstance(infiles, str):
            infiles = (infiles,)
        elif not isinstance(infiles, (list, tuple)):
            raise TypeError(
                  "'infiles' must be a string, or a list or tuple of strings")

        if exec_msg is None:
            exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles))

        # If 'outfile' must be regenerated (either because it doesn't
        # exist, is out-of-date, or the 'force' flag is true) then
        # perform the action that presumably regenerates it
        if self.force or dep_util.newer_group(infiles, outfile):
            self.execute(func, args, exec_msg, level)
        # Otherwise, print the "skip" message
        else:
            log.debug(skip_msg)

# XXX 'install_misc' class not currently used -- it was the base class for
# both 'install_scripts' and 'install_data', but they outgrew it.  It might
# still be useful for 'install_headers', though, so I'm keeping it around
# for the time being. 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:38,代码来源:cmd.py

示例6: make_file

# 需要导入模块: from distutils import util [as 别名]
# 或者: from distutils.util import execute [as 别名]
def make_file(self, infiles, outfile, func, args,
                  exec_msg=None, skip_msg=None, level=1):
        """Special case of 'execute()' for operations that process one or
        more input files and generate one output file.  Works just like
        'execute()', except the operation is skipped and a different
        message printed if 'outfile' already exists and is newer than all
        files listed in 'infiles'.  If the command defined 'self.force',
        and it is true, then the command is unconditionally run -- does no
        timestamp checks.
        """
        if skip_msg is None:
            skip_msg = "skipping %s (inputs unchanged)" % outfile

        # Allow 'infiles' to be a single string
        if isinstance(infiles, str):
            infiles = (infiles,)
        elif not isinstance(infiles, (list, tuple)):
            raise TypeError(
                  "'infiles' must be a string, or a list or tuple of strings")

        if exec_msg is None:
            exec_msg = "generating %s from %s" % (outfile, ', '.join(infiles))

        # If 'outfile' must be regenerated (either because it doesn't
        # exist, is out-of-date, or the 'force' flag is true) then
        # perform the action that presumably regenerates it
        if self.force or dep_util.newer_group(infiles, outfile):
            self.execute(func, args, exec_msg, level)
        # Otherwise, print the "skip" message
        else:
            log.debug(skip_msg) 
开发者ID:CedricGuillemet,项目名称:Imogen,代码行数:33,代码来源:cmd.py


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