diff options
author | David Cournapeau <cournape@gmail.com> | 2008-11-17 12:04:27 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-11-17 12:04:27 +0000 |
commit | 4ebd39d35a1ff5b045e02453548c621c016e6704 (patch) | |
tree | 0f416511ceaefb4964a9bcc378b2956e22344ebc /numpy/distutils/mingw32ccompiler.py | |
parent | 1d3d4cd14e397269c08b8dc794e0835ca551efa9 (diff) | |
download | numpy-4ebd39d35a1ff5b045e02453548c621c016e6704.tar.gz |
Refactor msvc runtime checking, put it into mingw32compiler
Diffstat (limited to 'numpy/distutils/mingw32ccompiler.py')
-rw-r--r-- | numpy/distutils/mingw32ccompiler.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py index 3027fba9a..a62be27a4 100644 --- a/numpy/distutils/mingw32ccompiler.py +++ b/numpy/distutils/mingw32ccompiler.py @@ -294,3 +294,16 @@ def manifest_rc(name, type='dll'): return """\ #include "winuser.h" %d RT_MANIFEST %s""" % (rctype, name) + +def check_embedded_msvcr_match_linked(msver): + """msver is the ms runtime version used for the MANIFEST.""" + # check msvcr major version are the same for linking and + # embedding + msvcv = msvc_runtime_library() + if msvcv: + maj = msvcv[5:6] + if not maj == int(msver): + raise ValueError, + "Dyscrepancy between linked msvcr " \ + "(%f) and the one about to be embedded " \ + "(%f)" % (int(msver), maj) |