summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-02-28 17:21:39 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-02-28 17:21:39 (GMT)
commit3f5fcc8acce9fa620fe29d15980850e433f1d5c9 (patch)
treec0e81780a6516e2b6935b7b4df29d6b0e9c7b95c /setup.py
parentedaa071eb45cecbcf4d74b886bfac1ac2a780916 (diff)
downloadcpython-3f5fcc8acce9fa620fe29d15980850e433f1d5c9.zip
cpython-3f5fcc8acce9fa620fe29d15980850e433f1d5c9.tar.gz
cpython-3f5fcc8acce9fa620fe29d15980850e433f1d5c9.tar.bz2
Fix SF bug #690012 (among others), iconv_codec stops build
Change setup.py to catch all exceptions. - Rename module if the exception was an ImportError - Only warn if the exception was any other error Revert _iconv_codec to raising a RuntimeError.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index ca4bf9f..7c362f5 100644
--- a/setup.py
+++ b/setup.py
@@ -207,9 +207,10 @@ class PyBuildExt(build_ext):
self.get_ext_filename(self.get_ext_fullname(ext.name)))
try:
imp.load_dynamic(ext.name, ext_filename)
- except ImportError, why:
+ except:
- if 1:
+ exc_type, why, tb = sys.exc_info()
+ if issubclass(exc_type, ImportError):
self.announce('*** WARNING: renaming "%s" since importing it'
' failed: %s' % (ext.name, why), level=3)
assert not self.inplace
@@ -231,7 +232,8 @@ class PyBuildExt(build_ext):
self.announce('unable to remove files (ignored)')
else:
self.announce('*** WARNING: importing extension "%s" '
- 'failed: %s' % (ext.name, why), level=3)
+ 'failed with %s: %s' % (ext.name, exc_type, why),
+ level=3)
def get_platform (self):
# Get value of sys.platform