本文整理匯總了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')