From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mx.groups.io with SMTP id smtpd.web10.85943.1682442938715284323 for ; Tue, 25 Apr 2023 10:15:38 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm1 header.b=aflMVroY; spf=pass (domain: bsdio.com, ip: 66.111.4.27, mailfrom: rebecca@bsdio.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id E439D5C013B; Tue, 25 Apr 2023 13:15:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 25 Apr 2023 13:15:37 -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=1682442937; x=1682529337; bh=Pr6XDeedf9 OSZ5VeXuIm2hHPyaOfmwxnjMYFUwCBaP8=; b=aflMVroYtXTfEB81IuNrGlOwHd 5I/IFm7Oy/haAP1RzEiiAR9upqvwo/na7GSimtDDus+/oJ+I3NYssUEw1umd/EIB n7hF5BdSHk0tffkT7qWsj4wq7Z9wlnf1JG402BPD7A9H66wm3WxqNslGfZ62zkBM IVVxdN/pNSIeY6ByfozLz7CRJGUwfIb967N8mpkvecfs36S9JZc9Nl/X+By/jcY2 1tU92cFqBtgCJae2PQC0asBy58kZuFkp4fHnHLCe8Co7TzihQVrO1MRW9ivTtvua xOFxBWgnQeCs0yMTq+w6FNLt7ecFUa7aCYGrKZ8RITDyl3CSyzW1SAsteOHA== 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=1682442937; x=1682529337; bh=Pr6XDeedf9OSZ 5VeXuIm2hHPyaOfmwxnjMYFUwCBaP8=; b=c8+k+tgEDfxkO8aGCg0/F0qzsPjZZ 6u6NV2PAoFz9bQsC9KMJvX3RqMtlHAnPnjrzB/SyGJH3xbxWIYAigHGnIK7c3z+W Ky29w/H7iT9dqYFbpEafSJjavbjYjkCETAa9gIO3yif6lBLpSl2KB0l6kK4QHu1x J4ULDI9B+gHelmA+B5huh4/fmJliLVPREdGw+FOi8kt1Jw/qEgEhrGxqE8ldioOB hsPjACm6C7tdfrM2HaD6riwBMSEajgQg03k+DeqrALA7otf3zUjI6KQWq0zk0i1R Jv1XIfdCznSML8kXm0Z4ds+VoE3GDijAg22L1Pbi7RRcB1lmZldTPN2pw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeduvddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeftvggsvggt tggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrghtth gvrhhnpeegvdegjeethfffvedvvdfftdeffeehtefhhedvvdekleeuheehfedvudekvefg gfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprhgvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Apr 2023 13:15:35 -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 0/6] edksetup.bat, BaseTools: Improve Windows environment setup and BaseTools C compilation Date: Tue, 25 Apr 2023 11:15:12 -0600 Message-Id: <20230425171518.1584-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.9 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 Rebecca Cran (6): 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: Update toolsetup.bat to not use BASETOOLS_PYTHON_SOURCE BaseTools: only print the environment once in toolsetup.bat BaseTools/Source/C/Makefiles/NmakeSubdirs.py | 2 +- BaseTools/Tests/PythonTest.py | 21 ++- BaseTools/toolsetup.bat | 157 ++++++++------------ edksetup.bat | 1 + 4 files changed, 85 insertions(+), 96 deletions(-) -- 2.40.0.windows.1