From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web10.98034.1683510222875262796 for ; Sun, 07 May 2023 18:43:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=CMlpXTnz; spf=pass (domain: byosoft.com.cn, ip: 121.46.250.151, mailfrom: gaoliming@byosoft.com.cn) Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id E28F5DDA794 for ; Mon, 8 May 2023 09:43:40 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1683510221; bh=uZoG43VgHU9JzQJxBb/G+PAymvHoVa/rkVOlSr7l+PY=; h=From:To:References:In-Reply-To:Subject:Date; b=CMlpXTnzJkwFjiE+ySLqpH87Onvhdt3c5hS3ETzOnxLqeOU/PffGY4sM5be0HEH1p hroZlf6xSCc6C2ATTMZZh6i0lu4p9ZEFmUIDovM4l2pe1FJOyKCQFYIEaj/75FyZDj ytHPfgpCGOQrju3xq+curVj6fdnThwRi4eV0OyZg= Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id DE1A1DDA795 for ; Mon, 8 May 2023 09:43:40 +0800 (CST) Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id A2AC8DDA7D7 for ; Mon, 8 May 2023 09:43:40 +0800 (CST) Authentication-Results: cxsh.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id 52A85DDA7E2 for ; Mon, 8 May 2023 09:43:37 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Mon, 08 May 2023 09:43:28 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Andrew Fish'" , "'Leif Lindholm'" , "'Kinney, Michael D'" , "'Bob Feng'" , "'Yuwei Chen'" References: <20230506193052.1835-1-rebecca@bsdio.com> <008101d9814c$a5018c60$ef04a520$@byosoft.com.cn> <4672f0d7-a84e-4e57-a11c-ec8f579d6f23@app.fastmail.com> In-Reply-To: <4672f0d7-a84e-4e57-a11c-ec8f579d6f23@app.fastmail.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0g5Zue5aSNOiBbUEFUQ0ggdjMgMC80XSBlZGtzZXR1cC5iYXQsIEJhc2VUb29sczogSW1wcm92ZSBXaW5kb3dzIGVudmlyb25tZW50IHNldHVwIGFuZCBCYXNlVG9vbHMgQyBjb21waWxhdGlvbg==?= Date: Mon, 8 May 2023 09:43:30 +0800 Message-ID: <00a701d9814e$7e155620$7a400260$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQD7cLOaIOMgWkBLS6jqWguJC/jZBQKQ6zutAZOj03Cw6pa18A== Sender: "gaoliming" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Rebecca: I see this patch. It removes python2. But, it doesn't add python version = check. Will you add this check in edksetup.sh? Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Rebecca Cran > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B45=E6=9C=888=E6=97=A5 9= :32 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming ; > Andrew Fish ; Leif Lindholm ; > Kinney, Michael D ; 'Bob Feng' > ; 'Yuwei Chen' > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] =E5=9B=9E=E5=A4=8D: [PATCH v3 0/4] e= dksetup.bat, BaseTools: > Improve Windows environment setup and BaseTools C compilation >=20 > I=E2=80=99ve removed the python 2 checks from edksetup.sh in the patch = =E2=80=9CRemove > bashisms from edksetup.sh and BaseTools/BuildEnv=E2=80=9D that I sent out= a few > days ago. >=20 > Rebecca >=20 > On Sun, May 7, 2023, at 7:30 PM, gaoliming via groups.io wrote: > > Rebecca: > > This change is good to me. Reviewed-by: Liming Gao > > cn> > > > > But, I see edksetup.sh also has python2 check. I think the same clean= up > > can be done in edksetup.sh. > > > > Thanks > > Liming > >> -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > >> =E5=8F=91=E4=BB=B6=E4=BA=BA: Rebecca Cran > >> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B45=E6=9C=887=E6=97= =A5 3:31 > >> =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; Andrew Fish ; Leif > >> Lindholm ; Michael D Kinney > >> ; Liming Gao ; > >> Bob Feng ; Yuwei Chen > >> =E6=8A=84=E9=80=81: Rebecca Cran > >> =E4=B8=BB=E9=A2=98: [PATCH v3 0/4] edksetup.bat, BaseTools: Improve Wi= ndows > >> environment setup and BaseTools C compilation > >> > >> There are remnants of Python 2 support in BaseTools/toolsetup.bat that > > it's > >> probably time to remove since we only support Python 3.6 and newer > these > >> days. > >> So, remove the variables that enable Python3 support and simplify the > > batch > >> script. I've also seen errors where after running edksetup.bat the bui= ld > >> command isn't available because PYTHONPATH wasn't being set, so fix th= at > >> when the Pip BaseTools are being used. > >> > >> At the same time, let's add a check that we meet the minimum version > >> requirement so we don't end up failing with an obscure error. > >> > >> Building BaseTools causes a warning about threading.currentThread bein= g > >> deprecated, so update code in NmakeSubdirs.py to switch to > >> threading.current_thread. > >> > >> There needs to be further work, because if PYTHON_COMMAND isn't > >> specified then > >> it defaults to "py -3", where py is C:\Windows\py.exe, which doesn't w= ork > > if > >> you're using a virtualenv since it installs python.exe and pythonw.exe= in > >> venv\Scripts. toolsetup.bat therefore fails to detect the Pip BaseTool= s > > and > >> uses the in-source Basetools. > >> > >> GitHub PR: https://github.com/tianocore/edk2/pull/4302 > >> GitHub branch: https://github.com/bcran/edk2/tree/py3 > >> > >> Changes between v1 and v2 > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > >> > >> - Require Python 3.6 or newer: 3.6 was when PEP 526 was added, which > we > >> use. > >> - Fix Tests/RunTests.py on Windows. > >> > >> Rebecca Cran (4): > >> BaseTools: Remove Python2/Python3 detection from toolset.bat > >> BaseTools: use threading.current_thread in NmakeSubdirs.py > >> edksetup.bat: if toolsetup.bat fails, just exit > >> BaseTools: Update toolsetup.bat and Tests/PythonTest.py to check ver > >> > >> BaseTools/Source/C/Makefiles/NmakeSubdirs.py | 2 +- > >> BaseTools/Tests/PythonTest.py | 22 +++- > >> BaseTools/toolsetup.bat | 119 > >> ++++++++------------ > >> edksetup.bat | 1 + > >> 4 files changed, 69 insertions(+), 75 deletions(-) > >> > >> -- > >> 2.40.0.windows.1 > > > > > > > > > > > > >=20 >=20 >=20 >=20