Catch another error on windows compiler failure (#1830)

This commit is contained in:
Will 2018-06-08 21:48:03 -04:00 committed by Kowlin
parent 033d0113a5
commit 9e7bc94aab

View File

@ -1,9 +1,8 @@
from distutils.core import setup from distutils.core import setup
from distutils import ccompiler from distutils import ccompiler
from distutils.errors import CCompilerError from distutils.errors import CCompilerError, DistutilsPlatformError
from pathlib import Path from pathlib import Path
import re import re
import importlib
import tempfile import tempfile
import os import os
@ -34,7 +33,7 @@ def check_compiler_available():
tfile.seek(0) tfile.seek(0)
try: try:
m.compile([tfile.name]) m.compile([tfile.name])
except CCompilerError: except (CCompilerError, DistutilsPlatformError):
return False return False
return True return True