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


Python build.run方法代码示例

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


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

示例1: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
            versions = get_versions(verbose=True)
            target_versionfile = versionfile_source
            print("UPDATING %s" % target_versionfile)
            os.unlink(target_versionfile)
            f = open(target_versionfile, "w")
            f.write(SHORT_VERSION_PY % versions)
            f.close()
            _build_exe.run(self)
            os.unlink(target_versionfile)
            f = open(versionfile_source, "w")
            f.write(LONG_VERSION_PY % {"DOLLAR": "$",
                                       "TAG_PREFIX": tag_prefix,
                                       "PARENTDIR_PREFIX": parentdir_prefix,
                                       "VERSIONFILE_SOURCE": versionfile_source,
                                       })
            f.close() 
开发者ID:matthew-brett,项目名称:delocate,代码行数:19,代码来源:versioneer.py

示例2: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        """
        Run ``./configure`` and Cython first.
        """
        config_h = opj("src", "cysignals", "cysignals_config.h")
        if not os.path.isfile(config_h):
            import subprocess
            subprocess.check_call(["make", "configure"])
            subprocess.check_call(["sh", "configure"])

        dist = self.distribution
        ext_modules = dist.ext_modules
        if ext_modules:
            dist.ext_modules[:] = self.cythonize(ext_modules)

        _build.run(self) 
开发者ID:sagemath,项目名称:cysignals,代码行数:18,代码来源:setup.py

示例3: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
            versions = get_versions(verbose=True)
            target_versionfile = versionfile_source
            print("UPDATING %s" % target_versionfile)
            os.unlink(target_versionfile)
            f = open(target_versionfile, "w")
            f.write(SHORT_VERSION_PY % versions)
            f.close()
            _build_exe.run(self)
            os.unlink(target_versionfile)
            f = open(versionfile_source, "w")
            f.write(LONG_VERSION_PY % {"DOLLAR": "$",
                                       "TAG_PREFIX": tag_prefix,
                                       "PARENTDIR_PREFIX": parentdir_prefix,
                                       "VERSIONFILE_SOURCE": versionfile_source,
                                       "LOOKUPFILE": '"%s"' % lookupfile if lookupfile is not None else "None",
                                       })
            f.close() 
开发者ID:foosel,项目名称:netconnectd,代码行数:20,代码来源:versioneer.py

示例4: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        environ.setdefault("DJANGO_SETTINGS_MODULE", "byro.settings")
        try:
            import django
        except ImportError:  # Move to ModuleNotFoundError once we drop Python 3.5
            return
        django.setup()
        from django.conf import settings
        from django.core import management

        settings.COMPRESS_ENABLED = True
        settings.COMPRESS_OFFLINE = True

        management.call_command("compilemessages", verbosity=1)
        management.call_command("collectstatic", verbosity=1, interactive=False)
        management.call_command("compress", verbosity=1)
        build.run(self) 
开发者ID:byro,项目名称:byro,代码行数:19,代码来源:setup.py

示例5: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        from grpc_tools import protoc
        include = pkg_resources.resource_filename('grpc_tools', '_proto')
        for src in glob(os.path.join(JAVA_PROTO_DIR, "*.proto")):
            command = ['grpc_tools.protoc',
                       '--proto_path=%s' % JAVA_PROTO_DIR,
                       '--proto_path=%s' % include,
                       '--python_out=%s' % SKEIN_PROTO_DIR,
                       '--grpc_python_out=%s' % SKEIN_PROTO_DIR,
                       src]
            if protoc.main(command) != 0:
                self.warn('Command: `%s` failed'.format(command))
                sys.exit(1)

        for path in _compiled_protos():
            self._fix_imports(path) 
开发者ID:jcrist,项目名称:skein,代码行数:18,代码来源:setup.py

示例6: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        self.run_command('build_ext')
        build.run(self) 
开发者ID:Cisco-Talos,项目名称:BASS,代码行数:5,代码来源:setup.py

示例7: run_command

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
    assert isinstance(commands, list)
    p = None
    for c in commands:
        try:
            # remember shell=False, so use git.cmd on windows, not just git
            p = subprocess.Popen([c] + args, cwd=cwd, stdout=subprocess.PIPE,
                                 stderr=(subprocess.PIPE if hide_stderr
                                         else None))
            break
        except EnvironmentError:
            e = sys.exc_info()[1]
            if e.errno == errno.ENOENT:
                continue
            if verbose:
                print("unable to run %s" % args[0])
                print(e)
            return None
    else:
        if verbose:
            print("unable to find command, tried %s" % (commands,))
        return None
    stdout = p.communicate()[0].strip()
    if sys.version >= '3':
        stdout = stdout.decode()
    if p.returncode != 0:
        if verbose:
            print("unable to run %s (error)" % args[0])
        return None
    return stdout 
开发者ID:matthew-brett,项目名称:delocate,代码行数:32,代码来源:versioneer.py

示例8: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        self.check_liberasure()
        _build.run(self) 
开发者ID:openstack,项目名称:pyeclib,代码行数:5,代码来源:setup.py

示例9: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        old_build.run(self) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:4,代码来源:build.py

示例10: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        __builtins__.__NUMPY_SETUP__ = False
        import numpy
        print(numpy.get_include())
        _build.run(self) 
开发者ID:mulhod,项目名称:reviewer_experience_prediction,代码行数:7,代码来源:setup.py

示例11: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        dist = self.distribution
        ext_modules = dist.ext_modules
        if ext_modules:
            dist.ext_modules[:] = self.cythonize(ext_modules)
        _build.run(self) 
开发者ID:sagemath,项目名称:cysignals,代码行数:8,代码来源:setup.py

示例12: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        if test is not None and test.test is not None:
            assert test.test() == True, "Automated tests failed!"
            print("notice  all tests passed: OK!")
        else:
            print("notice  automated tests skipped!")

        build.run(self) 
开发者ID:pimoroni,项目名称:automation-hat,代码行数:10,代码来源:setup.py

示例13: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self):
        # Build our C library
        subprocess.check_call(['./Turbo/build_lib.sh'])
        _build.run(self) 
开发者ID:justvanrossum,项目名称:fontgoggles,代码行数:6,代码来源:setup.py

示例14: run

# 需要导入模块: from distutils.command.build import build [as 别名]
# 或者: from distutils.command.build.build import run [as 别名]
def run(self, *args):
        self.execute(_build_native, (), msg='Building angr_native')
        _build.run(self, *args) 
开发者ID:angr,项目名称:angr,代码行数:5,代码来源:setup.py


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