summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/MSCommon/vc.py
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2010-03-19 17:35:08 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2010-03-19 17:35:08 (GMT)
commitda04bf2404ae034019fa7133845ddeecfe02a410 (patch)
tree429be7502e5d6221048e721f4ac791b9c4ec32ac /src/engine/SCons/Tool/MSCommon/vc.py
parent584e8d787dd065619d73b947d3e474201cde0051 (diff)
downloadSCons-da04bf2404ae034019fa7133845ddeecfe02a410.zip
SCons-da04bf2404ae034019fa7133845ddeecfe02a410.tar.gz
SCons-da04bf2404ae034019fa7133845ddeecfe02a410.tar.bz2
Prevent "Exp" in MSVC version name from causing problems.
Diffstat (limited to 'src/engine/SCons/Tool/MSCommon/vc.py')
-rw-r--r--src/engine/SCons/Tool/MSCommon/vc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py
index 02f817c..ae5415d 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")