Spaces:
Running
on
L40S
Running
on
L40S
File size: 1,425 Bytes
d7e58f0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
@REM Copyright (c) Facebook, Inc. and its affiliates.
@REM All rights reserved.
@REM
@REM This source code is licensed under the BSD-style license found in the
@REM LICENSE file in the root directory of this source tree.
:: Set env vars that tell distutils to use the compiler that we put on path
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
SET "VS_VERSION=16.0"
SET "VS_MAJOR=16"
SET "VS_YEAR=2019"
set "MSYS2_ARG_CONV_EXCL=/AI;/AL;/OUT;/out"
set "MSYS2_ENV_CONV_EXCL=CL"
:: For Python 3.5+, ensure that we link with the dynamic runtime. See
:: http://stevedower.id.au/blog/building-for-python-3-5-part-two/ for more info
set "PY_VCRUNTIME_REDIST=%PREFIX%\\bin\\vcruntime140.dll"
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [16^,17^) -property installationPath`) do (
if exist "%%i" if exist "%%i\VC\Auxiliary\Build\vcvarsall.bat" (
set "VSINSTALLDIR=%%i\"
goto :vswhere
)
)
:vswhere
:: Shorten PATH to avoid the `input line too long` error.
SET MyPath=%PATH%
setlocal EnableDelayedExpansion
SET TempPath="%MyPath:;=";"%"
SET var=
FOR %%a IN (%TempPath%) DO (
IF EXIST %%~sa (
SET "var=!var!;%%~sa"
)
)
set "TempPath=!var:~1!"
endlocal & set "PATH=%TempPath%"
:: Shorten current directory too
FOR %%A IN (.) DO CD "%%~sA"
:: other things added by install_activate.bat at package build time
|