From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mx.groups.io with SMTP id smtpd.web11.40876.1683401468617268288 for ; Sat, 06 May 2023 12:31:08 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm1 header.b=nF13zTqh; spf=pass (domain: bsdio.com, ip: 64.147.123.24, mailfrom: rebecca@bsdio.com) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 285F13200319; Sat, 6 May 2023 15:31:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 06 May 2023 15:31:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1683401466; x=1683487866; bh=xKTBzYWAHM 9wsEynJiqvd0mnBV8XURyQklZVGITCvcw=; b=nF13zTqhjxIHqnTzc/SEOwMcje fU2x+PB31CfOTIbYpq/gh8HNx67ocMW5sQpTstrSnK1u08P/hGtBkS8sdPoeJAD9 WUrL1cqgsT8X5GoRN+5c5ka7oZzg5tLbIhDNk4qQ4zPY7gqAvvafIWiYNBCK3u9j 5afJwy3ML+3Hl2fbgUOpYpXJ6vJTsRNCZiI3/R0EFxUl4pQtSu1snZrK2KhyssFi u9STzbADPxqdfVgjXNqU84u8PWfbhdPMVrMcqisJ62Voae0XCIzBlhhYxvP98uZ+ NDZYGhrUnkxdwaF1iAMapdU3PXIv019wxPnS18o2h6cuy5dn0+5FhWOYoDUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1683401466; x=1683487866; bh=xKTBzYWAHM9ws EynJiqvd0mnBV8XURyQklZVGITCvcw=; b=kEZRDIfBaOWBTcjV/5UqUVVc5k8Sa 2hNiIj9QvwkJtkZcfczal475+hH93G5MizS9VqT4Qo2UV8BMoStS86rM16RYSkjx +U/iRJu7+4fLryagtQ2odGDvSlIHM7CNgIb9dLZ/wgHwxA3j4Pgo8RoyAwkb/xLG p9iVqDLkERgBg7VzTmUXCSoD/Jo2akjWRwq8RXDswMF8MjfiR5tBTaYtucYVBASL kkUkxgnB10gG32RhpIL+nLRFdoLWSc4V3+B7VEsWN6HqxiHm3ZRfJlzk02vNdWit o7AkgPWg8Ba4Up9ciZZKLsJ9I4B8OYrKa3gk4hRPrkcd5EdBSzThkJrdw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefgedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeftvggsvggt tggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrghtth gvrhhnpeegvdegjeethfffvedvvdfftdeffeehtefhhedvvdekleeuheehfedvudekvefg gfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprhgvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 6 May 2023 15:31:05 -0400 (EDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Andrew Fish , Leif Lindholm , Michael D Kinney , Liming Gao , Bob Feng , Yuwei Chen Cc: Rebecca Cran Subject: [PATCH v3 0/4] edksetup.bat, BaseTools: Improve Windows environment setup and BaseTools C compilation Date: Sat, 6 May 2023 13:30:48 -0600 Message-Id: <20230506193052.1835-1-rebecca@bsdio.com> X-Mailer: git-send-email 2.40.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 build command isn't available because PYTHONPATH wasn't being set, so fix that 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 being 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 work 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 BaseTools 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 ========================= - 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