[Scipy-svn] r5405 - branches/0.7.x/scipy/weave

scipy-svn@scip... scipy-svn@scip...
Thu Jan 8 12:17:59 CST 2009


Author: cdavid
Date: 2009-01-08 12:17:51 -0600 (Thu, 08 Jan 2009)
New Revision: 5405

Modified:
   branches/0.7.x/scipy/weave/build_tools.py
Log:
Detecting MS compiler is not enough; distutils cannot tell us if it can be run at all, so we try to run it by ourselves to see if that works.

Modified: branches/0.7.x/scipy/weave/build_tools.py
===================================================================
--- branches/0.7.x/scipy/weave/build_tools.py	2009-01-08 17:47:52 UTC (rev 5404)
+++ branches/0.7.x/scipy/weave/build_tools.py	2009-01-08 18:17:51 UTC (rev 5405)
@@ -372,9 +372,15 @@
     except:
         #assume we're ok if devstudio exists
         import distutils.msvccompiler
-        version = distutils.msvccompiler.get_build_version()
-        if version:
+        try:
+            cc = distutils.msvccompiler.MSVCCompiler()
+	    cc.initialize()
+            p = subprocess.Popen([cc.cc])
             result = 1
+        except distutils.errors.DistutilsPlatformError:
+            pass
+        except WindowsError:
+            pass
     return result
 
 if os.name == 'nt':



More information about the Scipy-svn mailing list