* [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set
@ 2019-08-19 9:24 Cheng, Ching JenX
2019-08-19 12:28 ` Chiu, Chasel
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Cheng, Ching JenX @ 2019-08-19 9:24 UTC (permalink / raw)
To: devel; +Cc: Amy Chan, Michael Kubacki, Chasel Chiu, Nate DeSimone, Liming Gao
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2041
[PATCH v2] Update related files
In Platform\Intel\MinPlatformPkg\Tools\Fsp\RebaseFspBinBaseAddress.py
It will run another python code.
But if the environment variable "PYTHON_HOME" is not exist
and we didn't add any python's path to "PATH".
It will cause error because python command not found.
the error message as below:
'python' is not recognized as an internal or external command,
operable program or batch file.
So we set the python's path from which execute the python code
if PYTHON_HOME was not exist.
Cc: Amy Chan <amy.chan@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Ching JenX Cheng <ching.jenx.cheng@intel.com>
---
Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
index a8165b08e6..fb4cf4f9b7 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
@@ -68,6 +68,8 @@ file.close()
pythontool = 'python'
if 'PYTHON_HOME' in os.environ:
pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'
+else:
+ 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.21.0.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set
2019-08-19 9:24 [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set Cheng, Ching JenX
@ 2019-08-19 12:28 ` Chiu, Chasel
2019-08-19 19:04 ` Nate DeSimone
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Chiu, Chasel @ 2019-08-19 12:28 UTC (permalink / raw)
To: Cheng, Ching JenX, devel@edk2.groups.io
Cc: Chan, Amy, Kubacki, Michael A, Desimone, Nathaniel L, Gao, Liming
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
> -----Original Message-----
> From: Cheng, Ching JenX
> Sent: Monday, August 19, 2019 5:24 PM
> To: devel@edk2.groups.io
> Cc: Chan, Amy <amy.chan@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [edk2-platforms: PATCH v2] Python run fail if env variable
> PYTHON_HOME is not set
>
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2041
>
> [PATCH v2] Update related files
>
> In Platform\Intel\MinPlatformPkg\Tools\Fsp\RebaseFspBinBaseAddress.py
> It will run another python code.
> But if the environment variable "PYTHON_HOME" is not exist and we didn't
> add any python's path to "PATH".
> It will cause error because python command not found.
>
> the error message as below:
> 'python' is not recognized as an internal or external command, operable
> program or batch file.
>
> So we set the python's path from which execute the python code if
> PYTHON_HOME was not exist.
>
> Cc: Amy Chan <amy.chan@intel.com>
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Ching JenX Cheng <ching.jenx.cheng@intel.com>
> ---
> Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 2
> ++
> 1 file changed, 2 insertions(+)
>
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> index a8165b08e6..fb4cf4f9b7 100644
> --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> +++
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> @@ -68,6 +68,8 @@ file.close()
> pythontool = 'python'
> if 'PYTHON_HOME' in os.environ:
> pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'
> +else:
> + 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.21.0.windows.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set
2019-08-19 9:24 [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set Cheng, Ching JenX
2019-08-19 12:28 ` Chiu, Chasel
@ 2019-08-19 19:04 ` Nate DeSimone
2019-08-19 22:04 ` [edk2-devel] " Kubacki, Michael A
2019-08-20 2:44 ` Chiu, Chasel
3 siblings, 0 replies; 5+ messages in thread
From: Nate DeSimone @ 2019-08-19 19:04 UTC (permalink / raw)
To: Cheng, Ching JenX, devel@edk2.groups.io
Cc: Chan, Amy, Kubacki, Michael A, Chiu, Chasel, Gao, Liming
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
-----Original Message-----
From: Cheng, Ching JenX
Sent: Monday, August 19, 2019 2:24 AM
To: devel@edk2.groups.io
Cc: Chan, Amy <amy.chan@intel.com>; Kubacki, Michael A <michael.a.kubacki@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2041
[PATCH v2] Update related files
In Platform\Intel\MinPlatformPkg\Tools\Fsp\RebaseFspBinBaseAddress.py
It will run another python code.
But if the environment variable "PYTHON_HOME" is not exist and we didn't add any python's path to "PATH".
It will cause error because python command not found.
the error message as below:
'python' is not recognized as an internal or external command, operable program or batch file.
So we set the python's path from which execute the python code if PYTHON_HOME was not exist.
Cc: Amy Chan <amy.chan@intel.com>
Cc: Michael Kubacki <michael.a.kubacki@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Ching JenX Cheng <ching.jenx.cheng@intel.com>
---
Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
index a8165b08e6..fb4cf4f9b7 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
@@ -68,6 +68,8 @@ file.close()
pythontool = 'python'
if 'PYTHON_HOME' in os.environ:
pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'
+else:
+ 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.21.0.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set
2019-08-19 9:24 [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set Cheng, Ching JenX
2019-08-19 12:28 ` Chiu, Chasel
2019-08-19 19:04 ` Nate DeSimone
@ 2019-08-19 22:04 ` Kubacki, Michael A
2019-08-20 2:44 ` Chiu, Chasel
3 siblings, 0 replies; 5+ messages in thread
From: Kubacki, Michael A @ 2019-08-19 22:04 UTC (permalink / raw)
To: devel@edk2.groups.io, Cheng, Ching JenX
Cc: Chan, Amy, Chiu, Chasel, Desimone, Nathaniel L, Gao, Liming
Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Cheng, Ching JenX
> Sent: Monday, August 19, 2019 2:24 AM
> To: devel@edk2.groups.io
> Cc: Chan, Amy <amy.chan@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [edk2-devel] [edk2-platforms: PATCH v2] Python run fail if env variable
> PYTHON_HOME is not set
>
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2041
>
> [PATCH v2] Update related files
>
> In Platform\Intel\MinPlatformPkg\Tools\Fsp\RebaseFspBinBaseAddress.py
> It will run another python code.
> But if the environment variable "PYTHON_HOME" is not exist and we didn't add
> any python's path to "PATH".
> It will cause error because python command not found.
>
> the error message as below:
> 'python' is not recognized as an internal or external command, operable
> program or batch file.
>
> So we set the python's path from which execute the python code if
> PYTHON_HOME was not exist.
>
> Cc: Amy Chan <amy.chan@intel.com>
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Ching JenX Cheng <ching.jenx.cheng@intel.com>
> ---
> Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> index a8165b08e6..fb4cf4f9b7 100644
> --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> @@ -68,6 +68,8 @@ file.close()
> pythontool = 'python'
> if 'PYTHON_HOME' in os.environ:
> pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'
> +else:
> + 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.21.0.windows.1
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set
2019-08-19 9:24 [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set Cheng, Ching JenX
` (2 preceding siblings ...)
2019-08-19 22:04 ` [edk2-devel] " Kubacki, Michael A
@ 2019-08-20 2:44 ` Chiu, Chasel
3 siblings, 0 replies; 5+ messages in thread
From: Chiu, Chasel @ 2019-08-20 2:44 UTC (permalink / raw)
To: Cheng, Ching JenX, devel@edk2.groups.io
Cc: Chan, Amy, Kubacki, Michael A, Desimone, Nathaniel L, Gao, Liming
Pushed: https://github.com/tianocore/edk2-platforms/commit/05e9ca3abfcf89795d90e31415bac28a9f350299
> -----Original Message-----
> From: Cheng, Ching JenX
> Sent: Monday, August 19, 2019 5:24 PM
> To: devel@edk2.groups.io
> Cc: Chan, Amy <amy.chan@intel.com>; Kubacki, Michael A
> <michael.a.kubacki@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [edk2-platforms: PATCH v2] Python run fail if env variable
> PYTHON_HOME is not set
>
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2041
>
> [PATCH v2] Update related files
>
> In Platform\Intel\MinPlatformPkg\Tools\Fsp\RebaseFspBinBaseAddress.py
> It will run another python code.
> But if the environment variable "PYTHON_HOME" is not exist and we didn't
> add any python's path to "PATH".
> It will cause error because python command not found.
>
> the error message as below:
> 'python' is not recognized as an internal or external command, operable
> program or batch file.
>
> So we set the python's path from which execute the python code if
> PYTHON_HOME was not exist.
>
> Cc: Amy Chan <amy.chan@intel.com>
> Cc: Michael Kubacki <michael.a.kubacki@intel.com>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Ching JenX Cheng <ching.jenx.cheng@intel.com>
> ---
> Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 2
> ++
> 1 file changed, 2 insertions(+)
>
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> index a8165b08e6..fb4cf4f9b7 100644
> --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> +++
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> @@ -68,6 +68,8 @@ file.close()
> pythontool = 'python'
> if 'PYTHON_HOME' in os.environ:
> pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'
> +else:
> + 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.21.0.windows.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-08-20 2:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-19 9:24 [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set Cheng, Ching JenX
2019-08-19 12:28 ` Chiu, Chasel
2019-08-19 19:04 ` Nate DeSimone
2019-08-19 22:04 ` [edk2-devel] " Kubacki, Michael A
2019-08-20 2:44 ` Chiu, Chasel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox