* [Edk2-platforms][PATCH] Tools/Fsp: Replace PYTHON_HOME with sys.executable
@ 2021-05-31 3:07 Yuwei Chen
2021-05-31 3:33 ` Bob Feng
0 siblings, 1 reply; 2+ messages in thread
From: Yuwei Chen @ 2021-05-31 3:07 UTC (permalink / raw)
To: devel; +Cc: Mingyue Liang, Bob Feng, Liming Gao
From: Mingyue Liang <mingyuex.liang@intel.com>
Currently script Python interpreter is inconsistent with the
interpreter specified by Python home. This patch is to change
pythonhome to sys.executable.
Signed-off-by: MingYue Liang <mingyuex.liang@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
.../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py
index 406e5ec130..9e58cbe312 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py
@@ -73,9 +73,7 @@ file.close()
# Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin.py script
# to dump the header, and get the ImageSize in FSP-M section
#
-pythontool = 'python'
-if 'PYTHON_HOME' in os.environ:
- pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'
+pythontool = sys.executable
Process = subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fspBinFilePath], stdout=subprocess.PIPE)
Output = Process.communicate()[0]
FsptInfo = Output.rsplit(b"FSP_M", 1);
--
2.26.2.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Edk2-platforms][PATCH] Tools/Fsp: Replace PYTHON_HOME with sys.executable
2021-05-31 3:07 [Edk2-platforms][PATCH] Tools/Fsp: Replace PYTHON_HOME with sys.executable Yuwei Chen
@ 2021-05-31 3:33 ` Bob Feng
0 siblings, 0 replies; 2+ messages in thread
From: Bob Feng @ 2021-05-31 3:33 UTC (permalink / raw)
To: Chen, Christine, devel@edk2.groups.io; +Cc: Liang, MingyueX, Liming Gao
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Chen, Christine <yuwei.chen@intel.com>
Sent: Monday, May 31, 2021 11:08 AM
To: devel@edk2.groups.io
Cc: Liang, MingyueX <mingyuex.liang@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
Subject: [Edk2-platforms][PATCH] Tools/Fsp: Replace PYTHON_HOME with sys.executable
From: Mingyue Liang <mingyuex.liang@intel.com>
Currently script Python interpreter is inconsistent with the interpreter specified by Python home. This patch is to change pythonhome to sys.executable.
Signed-off-by: MingYue Liang <mingyuex.liang@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
.../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py
index 406e5ec130..9e58cbe312 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAd
+++ dress.py
@@ -73,9 +73,7 @@ file.close()
# Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin.py script # to dump the header, and get the ImageSize in FSP-M section #-pythontool = 'python'-if 'PYTHON_HOME' in os.environ:- pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'+pythontool = sys.executable Process = subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fspBinFilePath], stdout=subprocess.PIPE) Output = Process.communicate()[0] FsptInfo = Output.rsplit(b"FSP_M", 1);--
2.26.2.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-31 3:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-31 3:07 [Edk2-platforms][PATCH] Tools/Fsp: Replace PYTHON_HOME with sys.executable Yuwei Chen
2021-05-31 3:33 ` Bob Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox