Re: [PATCH v1] BaseTools: toolsetup.bat always execute PYTHON_HOME
Rebecca Cran
That looks good. Thanks!
--
Rebecca Cran
toggle quoted message
Show quoted text
--
Rebecca Cran
On 5/26/23 10:56 AM, Guo, Gua wrote:
@Rebecca Cran
I update v2 patch on the PR https://github.com/tianocore/edk2/pull/4431
Could you help to check about whether meet your expectation ?
Thanks,
Gua
-----Original Message-----
From: Rebecca Cran <rebecca@...>
Sent: Saturday, May 27, 2023 12:30 AM
To: Guo, Gua <gua.guo@...>; devel@edk2.groups.io
Cc: Gao, Liming <gaoliming@...>; Feng, Bob C <bob.c.feng@...>; Chen, Christine <yuwei.chen@...>
Subject: Re: [PATCH v1] BaseTools: toolsetup.bat always execute PYTHON_HOME
On 5/25/23 6:09 PM, gua.guo@... wrote:-%PYTHON_COMMAND% %BASE_TOOLS_PATH%\Tests\PythonTest.pyIf PYTHON_COMMAND is already defined we do still want to check it's a version we can use. So I don't think this part of the change is correct.
%PYTHON_VER_MAJOR% %PYTHON_VER_MINOR% >NUL 2>NUL -if %ERRORLEVEL% EQU
1 (
- echo.
- echo !!! ERROR !!! Python %PYTHON_VER_MAJOR%.%PYTHON_VER_MINOR% or newer is required.
- echo.
- goto end
+ %PYTHON_COMMAND% %BASE_TOOLS_PATH%\Tests\PythonTest.py
+ %PYTHON_VER_MAJOR% %PYTHON_VER_MINOR% >NUL 2>NUL if %ERRORLEVEL% EQU 1 (
+ echo.
+ echo !!! ERROR !!! Python %PYTHON_VER_MAJOR%.%PYTHON_VER_MINOR% or newer is required.
+ echo.
+ goto end
+ )
)