當前位置: 首頁>>代碼示例>>Python>>正文


Python CCompiler.get_version方法代碼示例

本文整理匯總了Python中numpy.distutils.ccompiler.CCompiler.get_version方法的典型用法代碼示例。如果您正苦於以下問題:Python CCompiler.get_version方法的具體用法?Python CCompiler.get_version怎麽用?Python CCompiler.get_version使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在numpy.distutils.ccompiler.CCompiler的用法示例。


在下文中一共展示了CCompiler.get_version方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_version

# 需要導入模塊: from numpy.distutils.ccompiler import CCompiler [as 別名]
# 或者: from numpy.distutils.ccompiler.CCompiler import get_version [as 別名]
def get_version(self, force=False, ok_status=[0]):
        assert self._is_customised
        version = CCompiler.get_version(self, force=force, ok_status=ok_status)
        if version is None:
            raise CompilerNotFound()
        return version


    ############################################################

    ## Public methods: 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:13,代碼來源:__init__.py

示例2: _find_existing_fcompiler

# 需要導入模塊: from numpy.distutils.ccompiler import CCompiler [as 別名]
# 或者: from numpy.distutils.ccompiler.CCompiler import get_version [as 別名]
def _find_existing_fcompiler(compiler_types,
                             osname=None, platform=None,
                             requiref90=False,
                             c_compiler=None):
    from numpy.distutils.core import get_distribution
    dist = get_distribution(always=True)
    for compiler_type in compiler_types:
        v = None
        try:
            c = new_fcompiler(plat=platform, compiler=compiler_type,
                              c_compiler=c_compiler)
            c.customize(dist)
            v = c.get_version()
            if requiref90 and c.compiler_f90 is None:
                v = None
                new_compiler = c.suggested_f90_compiler
                if new_compiler:
                    log.warn('Trying %r compiler as suggested by %r '
                             'compiler for f90 support.' % (compiler_type,
                                                            new_compiler))
                    c = new_fcompiler(plat=platform, compiler=new_compiler,
                                      c_compiler=c_compiler)
                    c.customize(dist)
                    v = c.get_version()
                    if v is not None:
                        compiler_type = new_compiler
            if requiref90 and c.compiler_f90 is None:
                raise ValueError('%s does not support compiling f90 codes, '
                                 'skipping.' % (c.__class__.__name__))
        except DistutilsModuleError:
            log.debug("_find_existing_fcompiler: compiler_type='%s' raised DistutilsModuleError", compiler_type)
        except CompilerNotFound:
            log.debug("_find_existing_fcompiler: compiler_type='%s' not found", compiler_type)
        if v is not None:
            return compiler_type
    return None 
開發者ID:Frank-qlu,項目名稱:recruit,代碼行數:38,代碼來源:__init__.py

示例3: get_version

# 需要導入模塊: from numpy.distutils.ccompiler import CCompiler [as 別名]
# 或者: from numpy.distutils.ccompiler.CCompiler import get_version [as 別名]
def get_version(self, force=False, ok_status=[0]):
        assert self._is_customised
        version = CCompiler.get_version(self, force=force, ok_status=ok_status)
        if version is None:
            raise CompilerNotFound()
        return version

    ############################################################

    ## Public methods: 
開發者ID:ryfeus,項目名稱:lambda-packs,代碼行數:12,代碼來源:__init__.py


注:本文中的numpy.distutils.ccompiler.CCompiler.get_version方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。