[Numpy-svn] r3908 - trunk/numpy/distutils

numpy-svn@scip... numpy-svn@scip...
Fri Jul 27 15:48:52 CDT 2007


Author: pearu
Date: 2007-07-27 15:48:48 -0500 (Fri, 27 Jul 2007)
New Revision: 3908

Modified:
   trunk/numpy/distutils/misc_util.py
Log:
Try to fix build on AMD64 with MSVC compiler.

Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py	2007-07-27 16:44:39 UTC (rev 3907)
+++ trunk/numpy/distutils/misc_util.py	2007-07-27 20:48:48 UTC (rev 3908)
@@ -318,6 +318,20 @@
         lib = None
     return lib
 
+def msvc_on_amd64():
+    if not (sys.platform=='win32' or os.name=='nt'):
+        return
+    from distutils.msvccompiler import get_build_architecture
+    if get_build_architecture() != 'AMD64':
+        return
+    if os.environ.has_key('DISTUTILS_USE_SDK'):
+        return
+    # try to avoid _MSVCCompiler__root attribute error
+    os.environ['DISTUTILS_USE_SDK']=1
+    return
+
+msvc_on_amd64()
+
 #########################
 
 #XXX need support for .C that is also C++



More information about the Numpy-svn mailing list