From b94470116ca5cb31cb9f9737adf24ea9b69b0f55 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Sat, 11 Apr 2020 17:08:05 -0700 Subject: Address PR comments --- src/engine/SCons/Tool/MSCommon/vc.py | 2 -- src/engine/SCons/Tool/msvc.xml | 10 +++++----- test/Win32/scons-bat-error.py | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index ce1341d..456ccae 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -338,8 +338,6 @@ def msvc_find_vswhere(): # For bug 3542: also accommodate not being on C: drive. # NB: this gets called from testsuite on non-Windows platforms. # Whether that makes sense or not, don't break it for those. - # TODO: requested to add a user-specified path to vswhere - # and have this routine set the same var if it finds it. vswhere_path = None for pf in VSWHERE_PATHS: if os.path.exists(pf): diff --git a/src/engine/SCons/Tool/msvc.xml b/src/engine/SCons/Tool/msvc.xml index bdbf253..3e8ec95 100644 --- a/src/engine/SCons/Tool/msvc.xml +++ b/src/engine/SCons/Tool/msvc.xml @@ -487,14 +487,14 @@ It was initially distributed with MSVS 2017. But can detect MSVC 2010 and newer If &cv-VSWHERE; is set, SCons will use that location. -Otherwise SCons will look in the following locations and set VSWHERE to the PATH vswhere.exe -is located. +Otherwise SCons will look in the following locations and set VSWHERE to the first directory vswhere.exe +is found. -Note that &cv-VSWHERE; must be set in when tool msvc is initialized. This is either in the call to +Note that &cv-VSWHERE; must be set at the same time or prior to the msvc tool being initialized. So either set it as follows Environment(VSWHERE='c:/my/path/to/vswhere') or -if Environment created specifying not to automatically initialize any tools or tools which doesn't include msvc or MSVS -such as Environment(Tools=[]) +if your Environment() is created specifying no tools tools=[] or with a list of tools not including msvs or msvc or mslink + such as Environment(Tools=[]) diff --git a/test/Win32/scons-bat-error.py b/test/Win32/scons-bat-error.py index 4d5d00c..d772132 100644 --- a/test/Win32/scons-bat-error.py +++ b/test/Win32/scons-bat-error.py @@ -39,7 +39,7 @@ if sys.platform != 'win32': msg = "Skipping scons.bat test on non-Windows platform '%s'\n" % sys.platform test.skip_test(msg) -python = sys.executable #test.where_is('python') +python = test.where_is('python') if not python: msg = "Skipping scons.bat test; python is not on %PATH%.\n" -- cgit v0.12