本文整理汇总了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:
示例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
示例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: