BaseTools: Update toolsetup.bat to not use BASETOOLS_PYTHON_SOURCE

The BASETOOLS_PYTHON_SOURCE environment variable is only used temporarily to
set PYTHONPATH. Since it doesn't help improve clarity, remove it.

While here, make sure we set PYTHONPATH when we're using Pip BaseTools
so that build etc. can be found.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
This commit is contained in:
Rebecca Cran 2023-04-24 11:15:46 -06:00 committed by mergify[bot]
parent f47415e031
commit dd246227d6

View File

@ -371,14 +371,13 @@ if %ERRORLEVEL% EQU 0 (
@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%
set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python;%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
set PYTHONPATH=%BASE_TOOLS_PATH%\Source\Python;%PYTHONPATH%
goto print_python_info
:print_python_info