本文整理汇总了Python中numpy.distutils.fcompiler.CompilerNotFound方法的典型用法代码示例。如果您正苦于以下问题:Python fcompiler.CompilerNotFound方法的具体用法?Python fcompiler.CompilerNotFound怎么用?Python fcompiler.CompilerNotFound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numpy.distutils.fcompiler
的用法示例。
在下文中一共展示了fcompiler.CompilerNotFound方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: construct_build_ext
# 需要导入模块: from numpy.distutils import fcompiler [as 别名]
# 或者: from numpy.distutils.fcompiler import CompilerNotFound [as 别名]
def construct_build_ext(build_ext):
# This class allows extension building to fail.
# https://stackoverflow.com/questions/41778153/
ext_errors = (CCompilerError, DistutilsExecError,
DistutilsPlatformError, DistutilsError, IOError)
class WrappedBuildExt(build_ext):
def run(self):
try:
build_ext.run(self)
except (DistutilsPlatformError, CompilerNotFound) as x:
raise BuildFailed(x)
def build_extension(self, ext):
try:
build_ext.build_extension(self, ext)
except ext_errors as x:
raise BuildFailed(x)
return WrappedBuildExt
示例2: get_version
# 需要导入模块: from numpy.distutils import fcompiler [as 别名]
# 或者: from numpy.distutils.fcompiler import CompilerNotFound [as 别名]
def get_version(self):
raise CompilerNotFound('Flang unsupported on Python < 3.5')