From d9f7bd7f050c2f3efee87307c59fccd8682c07f2 Mon Sep 17 00:00:00 2001 From: garyo Date: Fri, 19 Mar 2010 17:35:08 +0000 Subject: [PATCH] Prevent "Exp" in MSVC version name from causing problems. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4711 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Tool/MSCommon/vc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 02f817c5..ae5415de 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -36,6 +36,7 @@ __doc__ = """Module for Visual C/C++ detection and configuration. """ import SCons.compat +import string import os import platform @@ -216,7 +217,9 @@ def find_batch_file(env,msvc_version): debug('vc.py: find_batch_file() pdir:%s'%pdir) - vernum = float(msvc_version) + # filter out e.g. "Exp" from the version name + msvc_ver_numeric = string.join(filter(lambda x: x in string.digits + ".", msvc_version), '') + vernum = float(msvc_ver_numeric) if 7 <= vernum < 8: pdir = os.path.join(pdir, os.pardir, "Common7", "Tools") batfilename = os.path.join(pdir, "vsvars32.bat") -- 2.26.2