[Numpy-svn] r6057 - in branches/visualstudio_manifest/numpy/distutils: . command
numpy-svn at scipy.org
numpy-svn at scipy.org
Mon Nov 17 07:04:43 EST 2008
Author: cdavid
Date: 2008-11-17 06:04:27 -0600 (Mon, 17 Nov 2008)
New Revision: 6057
Modified:
branches/visualstudio_manifest/numpy/distutils/command/config.py
branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py
Log:
Refactor msvc runtime checking, put it into mingw32compiler
Modified: branches/visualstudio_manifest/numpy/distutils/command/config.py
===================================================================
--- branches/visualstudio_manifest/numpy/distutils/command/config.py 2008-11-17 12:03:57 UTC (rev 6056)
+++ branches/visualstudio_manifest/numpy/distutils/command/config.py 2008-11-17 12:04:27 UTC (rev 6057)
@@ -12,8 +12,8 @@
from distutils.file_util import copy_file
from distutils.msvccompiler import get_build_version as get_build_msvc_version
from numpy.distutils.exec_command import exec_command
-from numpy.distutils.misc_util import msvc_runtime_library
-from numpy.distutils.mingw32compiler import msvc_manifest_xml
+from numpy.distutils.mingw32compiler import msvc_manifest_xml,
+ check_embedded_match_linked
LANG_EXT['f77'] = '.f'
LANG_EXT['f90'] = '.f90'
@@ -117,16 +117,7 @@
msver = get_build_msvc_version()
if msver is not None:
if msver >= 8:
- # 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)
+ check_embedded_msvcr_match_linked(msver)
return self._wrap_method(old_config._link,lang,
(body, headers, include_dirs,
Modified: branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py
===================================================================
--- branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py 2008-11-17 12:03:57 UTC (rev 6056)
+++ branches/visualstudio_manifest/numpy/distutils/mingw32ccompiler.py 2008-11-17 12:04:27 UTC (rev 6057)
@@ -294,3 +294,16 @@
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)
More information about the Numpy-svn
mailing list