diff options
author | Liming Gao <liming.gao@intel.com> | 2018-10-15 08:27:53 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-10-15 08:29:14 +0800 |
commit | 1ccc4d895dd8d659d016efcd6ef8a48749aba1d0 (patch) | |
tree | 0d5f58643cc72275887d3bb322813609906a9334 /BaseTools/toolsetup.bat | |
parent | 678f85131238622e576705117e299d81cff755c9 (diff) | |
download | edk2-1ccc4d895dd8d659d016efcd6ef8a48749aba1d0.tar.gz |
Revert BaseTools: PYTHON3 migration
This reverts commit 6693f359b3c213513c5096a06c6f67244a44dc52..
678f85131238622e576705117e299d81cff755c9.
Python3 migration is the fundamental change. It requires every developer
to install Python3. Before this migration, the well communication and wide
verification must be done. But now, most people is not aware of this change,
and not try it. So, Python3 migration is reverted and be moved to edk2-staging
Python3 branch for the edk2 user evaluation.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/toolsetup.bat')
-rwxr-xr-x | BaseTools/toolsetup.bat | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index 0d4028db78..33d50f58ad 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -299,32 +299,18 @@ goto end )
)
-set PYTHON3=py -3
-:check_python_version
- %PYTHON3% --version >NUL 2>&1
- if %ERRORLEVEL% NEQ 0 (
- if defined PYTHON_HOME (
- if EXIST "%PYTHON_HOME%" (
- set PYTHON3=%PYTHON_HOME%\python.exe
- )
+ if not defined PYTHON_HOME (
+ if defined PYTHONHOME (
+ set PYTHON_HOME=%PYTHONHOME%
+ ) else (
+ echo.
+ echo !!! ERROR !!! Binary python tools are missing. PYTHON_HOME environment variable is not set.
+ echo PYTHON_HOME is required to build or execute the python tools.
+ echo.
+ goto end
)
)
- %PYTHON3% --version >NUL 2>&1
- if %ERRORLEVEL% NEQ 0 (
- echo.
- echo !!! ERROR !!! %PYTHON3% not install.
- echo.
- goto end
- )
- FOR /F "TOKENS=1,2" %%i IN ('%PYTHON3% --version') DO set VERSION=%%j
- if /I "%VERSION%" LSS "3.6" (
- echo.
- echo !!! ERROR !!! python version should greater than or equal to version 3.6.
- echo.
- goto end
- )
-:check_freezer_path
@REM We have Python, now test for FreezePython application
if not defined PYTHON_FREEZER_PATH (
echo.
|