summaryrefslogtreecommitdiff
path: root/numpy/random/setup.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-11-14 16:58:16 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-11-14 16:58:16 +0000
commitb871795b907f5abafaf6f24e1cdd9707d727bfa1 (patch)
treef34a17ac8884600e04aa8faa9145c53cb563342a /numpy/random/setup.py
parenta10c989023f64c28bd18932581baa7982c8cd79d (diff)
downloadnumpy-b871795b907f5abafaf6f24e1cdd9707d727bfa1.tar.gz
Fix hex conversion for msvcrt (we do not need to convert VS verion, but MSVCRT version).
Diffstat (limited to 'numpy/random/setup.py')
-rw-r--r--numpy/random/setup.py6
1 files changed, 3 insertions, 3 deletions
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)))