[Numpy-svn] r6056 - branches/visualstudio_manifest/numpy/distutils/command
numpy-svn at scipy.org
numpy-svn at scipy.org
Mon Nov 17 07:04:11 EST 2008
Author: cdavid
Date: 2008-11-17 06:03:57 -0600 (Mon, 17 Nov 2008)
New Revision: 6056
Modified:
branches/visualstudio_manifest/numpy/distutils/command/config.py
Log:
Detect whether config link needs embedding the manifest for the MSVC runtime.
Modified: branches/visualstudio_manifest/numpy/distutils/command/config.py
===================================================================
--- branches/visualstudio_manifest/numpy/distutils/command/config.py 2008-11-17 07:00:42 UTC (rev 6055)
+++ branches/visualstudio_manifest/numpy/distutils/command/config.py 2008-11-17 12:03:57 UTC (rev 6056)
@@ -10,7 +10,10 @@
from distutils.command.config import LANG_EXT
from distutils import log
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
LANG_EXT['f77'] = '.f'
LANG_EXT['f90'] = '.f90'
@@ -110,6 +113,21 @@
if fileexists: continue
log.warn('could not find library %r in directories %s' \
% (libname, library_dirs))
+ elif self.compiler.compiler_type == 'mingw32':
+ 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)
+
return self._wrap_method(old_config._link,lang,
(body, headers, include_dirs,
libraries, library_dirs, lang))
More information about the Numpy-svn
mailing list