[pkg] Make sure the gecode extension build never ever fails (closes #158948) stable
authorRémi Cardona <remi.cardona@logilab.fr>
Fri, 02 Aug 2013 16:30:54 +0200
branchstable
changeset 710 679566d1203d
parent 709 3e6b5f8cc4d2
child 711 395b8ad2228c
[pkg] Make sure the gecode extension build never ever fails (closes #158948) In some cases (eg, windows without Visual Studio installed), distutils/setuptools build_ext.run() may raise exceptions other than CompileError. By catching all exceptions, we can make sure rql's setup.py never fails, which should help dumb package managers such as pip.
setup.py
--- a/setup.py	Wed May 15 08:32:26 2013 +0200
+++ b/setup.py	Fri Aug 02 16:30:54 2013 +0200
@@ -166,10 +166,9 @@
     In fact, if gecode extension fail, rql will use logilab.constraint
     """
     def run(self):
-        from distutils.errors import CompileError
         try:
             build_ext.build_ext.run(self)
-        except CompileError:
+        except Exception:
             import traceback
             traceback.print_exc()
             sys.stderr.write('================================\n'