Skip to content

Commit

Permalink
move variable UPLOAD_TP_FILE to the beginning or it cant be initializ…
Browse files Browse the repository at this point in the history
…ed when running build-whl task (#35895)
  • Loading branch information
betterpig authored Sep 22, 2021
1 parent f67a50b commit 482f062
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paddle/scripts/paddle_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ if not defined retry_times set retry_times=3
if not defined PYTHON_ROOT set PYTHON_ROOT=C:\Python37
if not defined BUILD_DIR set BUILD_DIR=build
set task_name=%1
set UPLOAD_TP_FILE=OFF

rem ------initialize the python environment------
set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe
Expand Down Expand Up @@ -382,7 +383,6 @@ if "%WITH_GPU%"=="ON" (
)
set THIRD_PARTY_HOME=%cache_dir:\=/%/third_party/%sub_dir%
set THIRD_PARTY_PATH=%THIRD_PARTY_HOME%/%md5%
set UPLOAD_TP_FILE=OFF

if not exist %THIRD_PARTY_PATH% (
echo There is no usable third_party cache in %THIRD_PARTY_PATH%, will download from bos.
Expand Down Expand Up @@ -521,8 +521,8 @@ if %ERRORLEVEL% NEQ 0 (
)
)

set BCE_FILE=%cache_dir%\bce-python-sdk-0.8.33\BosClient.py
if %UPLOAD_TP_FILE%==ON (
if "%UPLOAD_TP_FILE%"=="ON" (
set BCE_FILE=%cache_dir%\bce-python-sdk-0.8.33\BosClient.py
echo Uploading third_party: checking bce ...
if not exist %cache_dir%\bce-python-sdk-0.8.33 (
echo There is no bce in this PC, will install bce.
Expand Down

0 comments on commit 482f062

Please sign in to comment.