[Numpy-svn] r6033 - trunk/numpy/random

numpy-svn@scip... numpy-svn@scip...
Fri Nov 14 10:58:28 CST 2008


Author: cdavid
Date: 2008-11-14 10:58:16 -0600 (Fri, 14 Nov 2008)
New Revision: 6033

Modified:
   trunk/numpy/random/setup.py
Log:
Fix hex conversion for msvcrt (we do not need to convert VS verion, but MSVCRT version).

Modified: trunk/numpy/random/setup.py
===================================================================
--- trunk/numpy/random/setup.py	2008-11-14 16:55:54 UTC (rev 6032)
+++ trunk/numpy/random/setup.py	2008-11-14 16:58:16 UTC (rev 6033)
@@ -13,8 +13,8 @@
     return None
 
 def msvcrt_to_hex(msvc):
-    major = msvc / 100
-    minor = msvc - major * 100
+    major = msvc / 10
+    minor = msvc - major * 10
     return hex(major * 256 + minor)
 
 def configuration(parent_package='',top_path=None):
@@ -44,7 +44,7 @@
                 raise ValueError("Discrepancy between " \
                                  "msvc_runtime_library " \
                                  "and our msvc detection scheme ?")
-            hmsvc = msvcrt_to_hex(msvcrt)
+            hmsvc = msvcrt_to_hex(int(msvcrt[5:])
             defs.append("NPY_NEEDS_MINGW_TIME_WORKAROUND")
             defs.append(("NPY_MSVCRT_VERSION", str(hmsvc)))
 



More information about the Numpy-svn mailing list