Skip to content

Commit

Permalink
Fallback to seeing if an MSDEV environment has been setup already for…
Browse files Browse the repository at this point in the history
… windows

Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
  • Loading branch information
spham-amzn committed Feb 8, 2024
1 parent 98950a8 commit 07349b1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions package-system/python/win_x64/build_python.bat
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ for /f "tokens=*" %%i in ('vswhere -version [16.0^,17.0^) -property installation
echo Using Visual Studio: %VS2017_LOCATION%

if NOT exist "%VS2017_LOCATION%\Common7\Tools\vsdevcmd.bat" (
echo Could not find visual studio 2017 installed
exit /B 1
)
call "%VS2017_LOCATION%\Common7\Tools\vsdevcmd.bat"

IF NOT DEFINED VCINSTALLDIR (
echo Unable to find visual studio 2017 and the visual studio environment has not been set up
exit /B 1
) ELSE (
echo Unable to find visual studio 2017 but found Visual Studio installed at %VCINSTALLDIR%
)
) ELSE (
call "%VS2017_LOCATION%\Common7\Tools\vsdevcmd.bat"
)

echo Clearing %tempdir% if present...
rmdir /s /q %tempdir% > NUL
Expand Down

0 comments on commit 07349b1

Please sign in to comment.