public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran" <rebecca@bsdio.com>
To: devel@edk2.groups.io, Andrew Fish <afish@apple.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Bob Feng <bob.c.feng@intel.com>,
	Yuwei Chen <yuwei.chen@intel.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Subject: [PATCH 5/6] BaseTools: Update toolsetup.bat to not use BASETOOLS_PYTHON_SOURCE
Date: Tue, 25 Apr 2023 11:15:17 -0600	[thread overview]
Message-ID: <20230425171518.1584-6-rebecca@bsdio.com> (raw)
In-Reply-To: <20230425171518.1584-1-rebecca@bsdio.com>

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>
---
 BaseTools/toolsetup.bat | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat
index 66df628eac5f..80aa2992ba80 100755
--- a/BaseTools/toolsetup.bat
+++ b/BaseTools/toolsetup.bat
@@ -389,14 +389,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
-- 
2.40.0.windows.1


  parent reply	other threads:[~2023-04-25 17:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 17:15 [PATCH 0/6] edksetup.bat, BaseTools: Improve Windows environment setup and BaseTools C compilation Rebecca Cran
2023-04-25 17:15 ` [PATCH 1/6] BaseTools: Remove Python2/Python3 detection from toolset.bat Rebecca Cran
2023-04-25 17:15 ` [PATCH 2/6] BaseTools: use threading.current_thread in NmakeSubdirs.py Rebecca Cran
2023-04-25 17:15 ` [PATCH 3/6] edksetup.bat: if toolsetup.bat fails, just exit Rebecca Cran
2023-04-25 17:15 ` [PATCH 4/6] BaseTools: Update toolsetup.bat and Tests/PythonTest.py to check ver Rebecca Cran
2023-04-27  3:11   ` 回复: [edk2-devel] " gaoliming
2023-04-25 17:15 ` Rebecca Cran [this message]
2023-04-25 17:15 ` [PATCH 6/6] BaseTools: only print the environment once in toolsetup.bat Rebecca Cran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425171518.1584-6-rebecca@bsdio.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox