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

numpy-svn@scip... numpy-svn@scip...
Wed Sep 19 21:44:21 CDT 2007


Author: oliphant
Date: 2007-09-19 21:44:19 -0500 (Wed, 19 Sep 2007)
New Revision: 4051

Modified:
   trunk/numpy/distutils/misc_util.py
Log:
Fix problem with msvc_on_amd64 not working prior to Python 2.5

Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py	2007-09-20 02:29:24 UTC (rev 4050)
+++ trunk/numpy/distutils/misc_util.py	2007-09-20 02:44:19 UTC (rev 4051)
@@ -321,7 +321,10 @@
 def msvc_on_amd64():
     if not (sys.platform=='win32' or os.name=='nt'):
         return
-    from distutils.msvccompiler import get_build_architecture
+    try:  # get_build_architecture is only on Python 2.5
+        from distutils.msvccompiler import get_build_architecture
+    except ImportError:
+        return
     if get_build_architecture() != 'AMD64':
         return
     if os.environ.has_key('DISTUTILS_USE_SDK'):



More information about the Numpy-svn mailing list