[pygobject: 5/8] dsextras.py: check if gcc is there when platform is win32 and compiler is mingw32



commit 7aa783d5cd674f34da318f826bd5f4a0e09d24cb
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Tue Dec 14 12:29:54 2010 +0100

    dsextras.py: check if gcc is there when platform is win32 and compiler is mingw32

 dsextras.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/dsextras.py b/dsextras.py
index ee0b0fd..ef848e2 100644
--- a/dsextras.py
+++ b/dsextras.py
@@ -155,6 +155,9 @@ class BuildExt(build_ext):
         self.extra_compile_args = []
 
         if sys.platform == 'win32' and self.compiler.compiler_type == 'mingw32':
+            if not have_gcc():
+                raise SystemExit('ERROR: Could not find gcc.')
+
             # MSVC compatible struct packing is required.
             # Note gcc2 uses -fnative-struct while gcc3
             # and gcc4 use -mms-bitfields. Based on the
@@ -171,6 +174,9 @@ class BuildExt(build_ext):
 
     def modify_compiler(self):
         if sys.platform == 'win32' and self.compiler.compiler_type == 'mingw32':
+            if not have_gcc():
+                raise SystemExit('ERROR: Could not find gcc.')
+
             # Remove '-static' linker option to prevent MinGW ld
             # from trying to link with MSVC import libraries.
             if self.compiler.linker_so.count('-static'):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]