[Python-checkins] python/dist/src setup.py,1.151,1.152
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Fri, 28 Feb 2003 09:21:41 -0800
Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1:/tmp/cvs-serv13513
Modified Files:
setup.py
Log Message:
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.
Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.151
retrieving revision 1.152
diff -C2 -d -r1.151 -r1.152
*** setup.py 24 Feb 2003 12:56:36 -0000 1.151
--- setup.py 28 Feb 2003 17:21:37 -0000 1.152
***************
*** 208,214 ****
try:
imp.load_dynamic(ext.name, ext_filename)
! except ImportError, why:
! if 1:
self.announce('*** WARNING: renaming "%s" since importing it'
' failed: %s' % (ext.name, why), level=3)
--- 208,215 ----
try:
imp.load_dynamic(ext.name, ext_filename)
! except:
! 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)
***************
*** 232,236 ****
else:
self.announce('*** WARNING: importing extension "%s" '
! 'failed: %s' % (ext.name, why), level=3)
def get_platform (self):
--- 233,238 ----
else:
self.announce('*** WARNING: importing extension "%s" '
! 'failed with %s: %s' % (ext.name, exc_type, why),
! level=3)
def get_platform (self):