From b871795b907f5abafaf6f24e1cdd9707d727bfa1 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Fri, 14 Nov 2008 16:58:16 +0000 Subject: Fix hex conversion for msvcrt (we do not need to convert VS verion, but MSVCRT version). --- numpy/random/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'numpy') diff --git a/numpy/random/setup.py b/numpy/random/setup.py index b3e77039b..902b018cd 100644 --- a/numpy/random/setup.py +++ b/numpy/random/setup.py @@ -13,8 +13,8 @@ def msvc_version(): 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 @@ def configuration(parent_package='',top_path=None): 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))) -- cgit v1.2.1