diff setup.py @ 795:f5076e2a9786 trunk

Apply some patches for build from #165.
author cmlenz
date Thu, 15 Jan 2009 23:42:48 +0000
parents 291700beaa94
children f33ecf3c319e
line wrap: on
line diff
--- a/setup.py
+++ b/setup.py
@@ -40,23 +40,24 @@
     def run(self):
         try:
             build_ext.run(self)
-        except DistutilsPlatformError:
-            self._unavailable()
+        except DistutilsPlatformError, e:
+            self._unavailable(e)
 
     def build_extension(self, ext):
         try:
             build_ext.build_extension(self, ext)
             global _speedup_available
             _speedup_available = True
-        except CCompilerError, x:
-            self._unavailable()
+        except CCompilerError, e:
+            self._unavailable(e)
 
-    def _unavailable(self):
+    def _unavailable(self, exc):
         print '*' * 70
         print """WARNING:
 An optional C extension could not be compiled, speedups will not be
 available."""
         print '*' * 70
+        print exc
 
 
 if Feature:
@@ -83,6 +84,7 @@
 if bdist_egg:
     cmdclass['bdist_egg'] = my_bdist_egg
 
+
 setup(
     name = 'Genshi',
     version = '0.6',
Copyright (C) 2012-2017 Edgewall Software