BaseTools: Use pip module if available, CI uses it by default
Use the new edk2-basetools pip module. Includes a helpful message in setup to let users know which has been selected. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Yuwei <Chen<yuwei.chen@intel.com> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
ecc267fec5
commit
1534b6228b
@@ -393,12 +393,31 @@ goto end
|
||||
goto check_freezer_path
|
||||
)
|
||||
|
||||
|
||||
|
||||
:check_freezer_path
|
||||
endlocal
|
||||
|
||||
%PYTHON_COMMAND% -c "import edk2basetools" >NUL 2>NUL
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
goto use_pip_basetools
|
||||
) else (
|
||||
goto use_builtin_basetools
|
||||
)
|
||||
|
||||
:use_builtin_basetools
|
||||
@echo Using EDK2 in-source Basetools
|
||||
if defined BASETOOLS_PYTHON_SOURCE goto print_python_info
|
||||
set "PATH=%BASE_TOOLS_PATH%\BinWrappers\WindowsLike;%PATH%"
|
||||
set BASETOOLS_PYTHON_SOURCE=%BASE_TOOLS_PATH%\Source\Python
|
||||
set PYTHONPATH=%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH%
|
||||
goto print_python_info
|
||||
|
||||
:use_pip_basetools
|
||||
@echo Using Pip Basetools
|
||||
set "PATH=%BASE_TOOLS_PATH%\BinPipWrappers\WindowsLike;%PATH%"
|
||||
set BASETOOLS_PYTHON_SOURCE=edk2basetools
|
||||
goto print_python_info
|
||||
|
||||
:print_python_info
|
||||
echo PATH = %PATH%
|
||||
|
Reference in New Issue
Block a user