summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Brett <matthew.brett@gmail.com>2014-08-02 19:00:36 -0700
committerMatthew Brett <matthew.brett@gmail.com>2014-08-02 19:14:15 -0700
commit5064ad34ebff347dbd5001c1317fcb838ccd55a8 (patch)
tree68dc4eb0b0234a3dc4f5a05fc4ac1db5be7694f4
parentff1e1bf21c1ac82fc9134e4a31bb0243d170723b (diff)
downloadmarkupsafe-5064ad34ebff347dbd5001c1317fcb838ccd55a8.tar.gz
Added SystemError as possible compiling error
Python.org Python raises a SystemError for a missing compiler when running "customize_compiler" so before the "build_extension" method for which other errors get trapped. Look also for SystemError when running build_ext.run method to check for this.
-rw-r--r--setup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index d7bb2c3..07bb16f 100644
--- a/setup.py
+++ b/setup.py
@@ -22,11 +22,16 @@ for arg in '--with-speedups', '--without-speedups':
pass
+# Known errors when running build_ext.build_extension method
ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError)
if sys.platform == 'win32' and sys.version_info > (2, 6):
# 2.6's distutils.msvc9compiler can raise an IOError when failing to
# find the compiler
ext_errors += (IOError,)
+# Known errors when running build_ext.run method
+run_errors = (DistutilsPlatformError,)
+if sys.platform == 'darwin':
+ run_errors += (SystemError,)
class BuildFailed(Exception):
@@ -39,7 +44,7 @@ class ve_build_ext(build_ext):
def run(self):
try:
build_ext.run(self)
- except DistutilsPlatformError:
+ except run_errors:
raise BuildFailed()
def build_extension(self, ext):