[Numpy-svn] r6202 - trunk/numpy/distutils/command

numpy-svn@scip... numpy-svn@scip...
Sat Dec 27 04:32:09 CST 2008


Author: cdavid
Date: 2008-12-27 04:32:05 -0600 (Sat, 27 Dec 2008)
New Revision: 6202

Modified:
   trunk/numpy/distutils/command/config.py
Log:
Try to initialize the msvc compiler before the general code to detect the error early.

Modified: trunk/numpy/distutils/command/config.py
===================================================================
--- trunk/numpy/distutils/command/config.py	2008-12-27 10:30:49 UTC (rev 6201)
+++ trunk/numpy/distutils/command/config.py	2008-12-27 10:32:05 UTC (rev 6202)
@@ -41,15 +41,6 @@
     def _check_compiler (self):
         old_config._check_compiler(self)
         from numpy.distutils.fcompiler import FCompiler, new_fcompiler
-        if not isinstance(self.fcompiler, FCompiler):
-            self.fcompiler = new_fcompiler(compiler=self.fcompiler,
-                                           dry_run=self.dry_run, force=1,
-                                           c_compiler=self.compiler)
-            if self.fcompiler is not None:
-                self.fcompiler.customize(self.distribution)
-                if self.fcompiler.get_version():
-                    self.fcompiler.customize_cmd(self)
-                    self.fcompiler.show_customization()
 
         if sys.platform == 'win32' and self.compiler.compiler_type == 'msvc':
             # XXX: hack to circumvent a python 2.6 bug with msvc9compiler:
@@ -74,6 +65,16 @@
 ============================================================================"""
                     raise distutils.errors.DistutilsPlatformError(msg)
 
+        if not isinstance(self.fcompiler, FCompiler):
+            self.fcompiler = new_fcompiler(compiler=self.fcompiler,
+                                           dry_run=self.dry_run, force=1,
+                                           c_compiler=self.compiler)
+            if self.fcompiler is not None:
+                self.fcompiler.customize(self.distribution)
+                if self.fcompiler.get_version():
+                    self.fcompiler.customize_cmd(self)
+                    self.fcompiler.show_customization()
+
     def _wrap_method(self,mth,lang,args):
         from distutils.ccompiler import CompileError
         from distutils.errors import DistutilsExecError



More information about the Numpy-svn mailing list