* [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME
@ 2023-11-18 6:36 Nate DeSimone
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name Nate DeSimone
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Nate DeSimone @ 2023-11-18 6:36 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Liming Gao, Eric Dong
Removes usage PYTHON_HOME from RebaseFspBinBaseAddress.py
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
.../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
index b7e4bcf5f9..32db9eb1c4 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
@@ -1,6 +1,6 @@
## @ RebaseFspBinBaseAddress.py
#
-# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2023, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -65,11 +65,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'
-else:
- pythontool = sys.executable
+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.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111422): https://edk2.groups.io/g/devel/message/111422
Mute This Topic: https://groups.io/mt/102667304/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name
2023-11-18 6:36 [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME Nate DeSimone
@ 2023-11-18 6:36 ` Nate DeSimone
2023-11-28 3:20 ` Chiu, Chasel
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: " Nate DeSimone
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Nate DeSimone @ 2023-11-18 6:36 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu
Removes the assumption that the python interpreter will have the name
python.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
.../PurleyOpenBoardPkg/BoardMtOlympus/build_board.py | 8 ++++----
.../PurleyOpenBoardPkg/BoardTiogaPass/build_board.py | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
index 2ba615d3e4..ffe762e289 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
@@ -1,7 +1,7 @@
# @ build_board.py
# This adds additional functions to the build_bios.py
#
-# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2023, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -48,7 +48,7 @@ def pre_build_ex(config, functions):
print("AML_FILTER= ", config.get("AML_FILTER"))
# build the command with arguments
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"AmlGenOffset",
"AmlGenOffset.py"),
@@ -110,7 +110,7 @@ def post_build_ex(config, functions):
print("post_build_ex Error")
sys.exit(1)
- common_patch_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_patch_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "PatchBinFv.py"),
config["TARGET"],
@@ -131,7 +131,7 @@ def post_build_ex(config, functions):
print("Patch Error!")
sys.exit(1)
- common_rebase_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_rebase_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "RebaseBinFv.py"),
config["TARGET"],
diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
index 46fd389ef1..3b66df7115 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
@@ -1,7 +1,7 @@
# @ build_board.py
# This adds additional functions to the build_bios.py
#
-# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2018 - 2023, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2021, American Megatrends International LLC.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -49,7 +49,7 @@ def pre_build_ex(config, functions):
print("AML_FILTER= ", config.get("AML_FILTER"))
# build the command with arguments
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"AmlGenOffset",
"AmlGenOffset.py"),
@@ -111,7 +111,7 @@ def post_build_ex(config, functions):
print("post_build_ex Error")
sys.exit(1)
- common_patch_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_patch_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "PatchBinFv.py"),
config["TARGET"],
@@ -132,7 +132,7 @@ def post_build_ex(config, functions):
print("Patch Error!")
sys.exit(1)
- common_rebase_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_rebase_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "RebaseBinFv.py"),
config["TARGET"],
@@ -161,7 +161,7 @@ def post_build_ex(config, functions):
print("Patch Error!")
sys.exit(1)
- common_patchbfv_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_patchbfv_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "PatchBfv.py"),
os.path.join(config["BUILD_DIR_PATH"],
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111423): https://edk2.groups.io/g/devel/message/111423
Mute This Topic: https://groups.io/mt/102667305/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: Replace Python Interpreter Name
2023-11-18 6:36 [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME Nate DeSimone
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name Nate DeSimone
@ 2023-11-18 6:36 ` Nate DeSimone
2023-11-28 3:19 ` Chiu, Chasel
2023-11-28 3:17 ` [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME Chiu, Chasel
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Nate DeSimone @ 2023-11-18 6:36 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu
Removes the assumption that the python interpreter will have the name
python.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com
---
Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py | 4 ++--
.../Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 4 ++--
.../Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
index af6985019b..70ef4c2201 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
@@ -2,7 +2,7 @@
# Extensions for building Aowanda using build_bios.py
#
#
-# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2021 - 2023, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2022, American Megatrends International LLC. <BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -107,7 +107,7 @@ def pre_build_ex(config, functions):
if not os.path.exists(out_file_dir):
os.mkdir(out_file_dir)
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
"-d", "--aml_filter", config["AML_FILTER"],
"-o", out_file_path,
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index ccf7a8c55a..61b893686c 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -2,7 +2,7 @@
# Extensions for building JunctionCity using build_bios.py
#
#
-# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2021 - 2023, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2021, American Megatrends International LLC. <BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -107,7 +107,7 @@ def pre_build_ex(config, functions):
if not os.path.exists(out_file_dir):
os.mkdir(out_file_dir)
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
"-d", "--aml_filter", config["AML_FILTER"],
"-o", out_file_path,
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
index e2d32d3e13..8d62dd43b8 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
@@ -1,7 +1,7 @@
# @ build_board.py
# Extensions for building WilsonCityRvp using build_bios.py
#
-# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2021 - 2023, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -105,7 +105,7 @@ def pre_build_ex(config, functions):
if not os.path.exists(out_file_dir):
os.mkdir(out_file_dir)
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
"-d", "--aml_filter", config["AML_FILTER"],
"-o", out_file_path,
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111424): https://edk2.groups.io/g/devel/message/111424
Mute This Topic: https://groups.io/mt/102667306/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME
2023-11-18 6:36 [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME Nate DeSimone
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name Nate DeSimone
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: " Nate DeSimone
@ 2023-11-28 3:17 ` Chiu, Chasel
[not found] ` <1798A438690A80D8.26894@groups.io>
[not found] ` <1798A43863B4D009.26894@groups.io>
4 siblings, 0 replies; 9+ messages in thread
From: Chiu, Chasel @ 2023-11-28 3:17 UTC (permalink / raw)
To: Desimone, Nathaniel L, devel@edk2.groups.io; +Cc: Gao, Liming, Dong, Eric
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Thanks,
Chasel
> -----Original Message-----
> From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Sent: Friday, November 17, 2023 10:36 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
> Subject: [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of
> PYTHON_HOME
>
> Removes usage PYTHON_HOME from RebaseFspBinBaseAddress.py
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Eric Dong <eric.dong@intel.com>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
> .../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git
> a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> index b7e4bcf5f9..32db9eb1c4 100644
> --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
> @@ -1,6 +1,6 @@
> ## @ RebaseFspBinBaseAddress.py
> #
> -# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2019 - 2023, Intel Corporation. All rights
> +reserved.<BR>
> # SPDX-License-Identifier: BSD-2-Clause-Patent #
>
> @@ -65,11 +65,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'
> -else:
> - pythontool = sys.executable
> +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.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111782): https://edk2.groups.io/g/devel/message/111782
Mute This Topic: https://groups.io/mt/102667304/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: Replace Python Interpreter Name
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: " Nate DeSimone
@ 2023-11-28 3:19 ` Chiu, Chasel
0 siblings, 0 replies; 9+ messages in thread
From: Chiu, Chasel @ 2023-11-28 3:19 UTC (permalink / raw)
To: Desimone, Nathaniel L, devel@edk2.groups.io
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Thanks,
Chasel
> -----Original Message-----
> From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Sent: Friday, November 17, 2023 10:36 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>
> Subject: [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: Replace Python
> Interpreter Name
>
> Removes the assumption that the python interpreter will have the name python.
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com
> ---
> Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py | 4 ++--
> .../Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 4 ++--
> .../Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py | 4 ++--
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
> b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
> index af6985019b..70ef4c2201 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
> @@ -2,7 +2,7 @@
> # Extensions for building Aowanda using build_bios.py # # -# Copyright (c) 2021,
> Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2021 - 2023, Intel Corporation. All rights
> +reserved.<BR>
> # Copyright (c) 2022, American Megatrends International LLC. <BR> # SPDX-
> License-Identifier: BSD-2-Clause-Patent # @@ -107,7 +107,7 @@ def
> pre_build_ex(config, functions):
> if not os.path.exists(out_file_dir):
> os.mkdir(out_file_dir)
>
> - command = ["python",
> + command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset",
> "AmlGenOffset.py"),
> "-d", "--aml_filter", config["AML_FILTER"],
> "-o", out_file_path,
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> index ccf7a8c55a..61b893686c 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
> @@ -2,7 +2,7 @@
> # Extensions for building JunctionCity using build_bios.py # # -# Copyright (c)
> 2021, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2021 - 2023, Intel Corporation. All rights
> +reserved.<BR>
> # Copyright (c) 2021, American Megatrends International LLC. <BR> # SPDX-
> License-Identifier: BSD-2-Clause-Patent # @@ -107,7 +107,7 @@ def
> pre_build_ex(config, functions):
> if not os.path.exists(out_file_dir):
> os.mkdir(out_file_dir)
>
> - command = ["python",
> + command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset",
> "AmlGenOffset.py"),
> "-d", "--aml_filter", config["AML_FILTER"],
> "-o", out_file_path,
> diff --git a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
> b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
> index e2d32d3e13..8d62dd43b8 100644
> --- a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
> +++ b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
> @@ -1,7 +1,7 @@
> # @ build_board.py
> # Extensions for building WilsonCityRvp using build_bios.py # -# Copyright (c)
> 2021, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2021 - 2023, Intel Corporation. All rights
> +reserved.<BR>
> # SPDX-License-Identifier: BSD-2-Clause-Patent #
>
> @@ -105,7 +105,7 @@ def pre_build_ex(config, functions):
> if not os.path.exists(out_file_dir):
> os.mkdir(out_file_dir)
>
> - command = ["python",
> + command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset",
> "AmlGenOffset.py"),
> "-d", "--aml_filter", config["AML_FILTER"],
> "-o", out_file_path,
> --
> 2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111784): https://edk2.groups.io/g/devel/message/111784
Mute This Topic: https://groups.io/mt/102667306/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name Nate DeSimone
@ 2023-11-28 3:20 ` Chiu, Chasel
0 siblings, 0 replies; 9+ messages in thread
From: Chiu, Chasel @ 2023-11-28 3:20 UTC (permalink / raw)
To: Desimone, Nathaniel L, devel@edk2.groups.io
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Thanks,
Chasel
> -----Original Message-----
> From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Sent: Friday, November 17, 2023 10:36 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>
> Subject: [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python
> Interpreter Name
>
> Removes the assumption that the python interpreter will have the name python.
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
> .../PurleyOpenBoardPkg/BoardMtOlympus/build_board.py | 8 ++++----
> .../PurleyOpenBoardPkg/BoardTiogaPass/build_board.py | 10 +++++-----
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> index 2ba615d3e4..ffe762e289 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
> @@ -1,7 +1,7 @@
> # @ build_board.py
> # This adds additional functions to the build_bios.py # -# Copyright (c) 2019, Intel
> Corporation. All rights reserved.<BR>
> +# Copyright (c) 2019 - 2023, Intel Corporation. All rights
> +reserved.<BR>
> # SPDX-License-Identifier: BSD-2-Clause-Patent #
>
> @@ -48,7 +48,7 @@ def pre_build_ex(config, functions):
> print("AML_FILTER= ", config.get("AML_FILTER"))
>
> # build the command with arguments
> - command = ["python",
> + command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
> "AmlGenOffset",
> "AmlGenOffset.py"), @@ -110,7 +110,7 @@ def
> post_build_ex(config, functions):
> print("post_build_ex Error")
> sys.exit(1)
>
> - common_patch_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> + common_patch_command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
> "PatchFv", "PatchBinFv.py"),
> config["TARGET"], @@ -131,7 +131,7 @@ def
> post_build_ex(config, functions):
> print("Patch Error!")
> sys.exit(1)
>
> - common_rebase_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> + common_rebase_command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
> "PatchFv", "RebaseBinFv.py"),
> config["TARGET"], diff --git
> a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
> b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
> index 46fd389ef1..3b66df7115 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
> @@ -1,7 +1,7 @@
> # @ build_board.py
> # This adds additional functions to the build_bios.py # -# Copyright (c) 2018, Intel
> Corporation. All rights reserved.<BR>
> +# Copyright (c) 2018 - 2023, Intel Corporation. All rights
> +reserved.<BR>
> # Copyright (c) 2021, American Megatrends International LLC.<BR> # SPDX-
> License-Identifier: BSD-2-Clause-Patent # @@ -49,7 +49,7 @@ def
> pre_build_ex(config, functions):
> print("AML_FILTER= ", config.get("AML_FILTER"))
>
> # build the command with arguments
> - command = ["python",
> + command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
> "AmlGenOffset",
> "AmlGenOffset.py"), @@ -111,7 +111,7 @@ def
> post_build_ex(config, functions):
> print("post_build_ex Error")
> sys.exit(1)
>
> - common_patch_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> + common_patch_command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
> "PatchFv", "PatchBinFv.py"),
> config["TARGET"], @@ -132,7 +132,7 @@ def
> post_build_ex(config, functions):
> print("Patch Error!")
> sys.exit(1)
>
> - common_rebase_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> + common_rebase_command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
> "PatchFv", "RebaseBinFv.py"),
> config["TARGET"], @@ -161,7 +161,7 @@ def
> post_build_ex(config, functions):
> print("Patch Error!")
> sys.exit(1)
>
> - common_patchbfv_command = [os.path.join(config["PYTHON_HOME"],
> "python"),
> + common_patchbfv_command = [sys.executable,
> os.path.join(config["MIN_PACKAGE_TOOLS"],
> "PatchFv", "PatchBfv.py"),
> os.path.join(config["BUILD_DIR_PATH"],
> --
> 2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111785): https://edk2.groups.io/g/devel/message/111785
Mute This Topic: https://groups.io/mt/102667305/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: Replace Python Interpreter Name
[not found] ` <1798A438690A80D8.26894@groups.io>
@ 2023-11-29 0:03 ` Nate DeSimone
0 siblings, 0 replies; 9+ messages in thread
From: Nate DeSimone @ 2023-11-29 0:03 UTC (permalink / raw)
To: devel@edk2.groups.io; +Cc: Chiu, Chasel
Pushed as 7528798
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
Sent: Friday, November 17, 2023 10:36 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>
Subject: [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: Replace Python Interpreter Name
Removes the assumption that the python interpreter will have the name python.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com
---
Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py | 4 ++--
.../Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py | 4 ++--
.../Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
index af6985019b..70ef4c2201 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/Aowanda/build_board.py
@@ -2,7 +2,7 @@
# Extensions for building Aowanda using build_bios.py # # -# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2021 - 2023, Intel Corporation. All rights
+reserved.<BR>
# Copyright (c) 2022, American Megatrends International LLC. <BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -107,7 +107,7 @@ def pre_build_ex(config, functions):
if not os.path.exists(out_file_dir):
os.mkdir(out_file_dir)
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
"-d", "--aml_filter", config["AML_FILTER"],
"-o", out_file_path,
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
index ccf7a8c55a..61b893686c 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/JunctionCity/build_board.py
@@ -2,7 +2,7 @@
# Extensions for building JunctionCity using build_bios.py # # -# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2021 - 2023, Intel Corporation. All rights
+reserved.<BR>
# Copyright (c) 2021, American Megatrends International LLC. <BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -107,7 +107,7 @@ def pre_build_ex(config, functions):
if not os.path.exists(out_file_dir):
os.mkdir(out_file_dir)
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
"-d", "--aml_filter", config["AML_FILTER"],
"-o", out_file_path,
diff --git a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
index e2d32d3e13..8d62dd43b8 100644
--- a/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
+++ b/Platform/Intel/WhitleyOpenBoardPkg/WilsonCityRvp/build_board.py
@@ -1,7 +1,7 @@
# @ build_board.py
# Extensions for building WilsonCityRvp using build_bios.py # -# Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2021 - 2023, Intel Corporation. All rights
+reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent #
@@ -105,7 +105,7 @@ def pre_build_ex(config, functions):
if not os.path.exists(out_file_dir):
os.mkdir(out_file_dir)
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"], "AmlGenOffset", "AmlGenOffset.py"),
"-d", "--aml_filter", config["AML_FILTER"],
"-o", out_file_path,
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111829): https://edk2.groups.io/g/devel/message/111829
Mute This Topic: https://groups.io/mt/102862612/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name
[not found] ` <1798A43863B4D009.26894@groups.io>
@ 2023-11-29 0:03 ` Nate DeSimone
0 siblings, 0 replies; 9+ messages in thread
From: Nate DeSimone @ 2023-11-29 0:03 UTC (permalink / raw)
To: devel@edk2.groups.io; +Cc: Chiu, Chasel
Pushed as 15e9fae
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
Sent: Friday, November 17, 2023 10:36 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>
Subject: [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name
Removes the assumption that the python interpreter will have the name python.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
.../PurleyOpenBoardPkg/BoardMtOlympus/build_board.py | 8 ++++----
.../PurleyOpenBoardPkg/BoardTiogaPass/build_board.py | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
index 2ba615d3e4..ffe762e289 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/build_board.py
@@ -1,7 +1,7 @@
# @ build_board.py
# This adds additional functions to the build_bios.py # -# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2023, Intel Corporation. All rights
+reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent #
@@ -48,7 +48,7 @@ def pre_build_ex(config, functions):
print("AML_FILTER= ", config.get("AML_FILTER"))
# build the command with arguments
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"AmlGenOffset",
"AmlGenOffset.py"), @@ -110,7 +110,7 @@ def post_build_ex(config, functions):
print("post_build_ex Error")
sys.exit(1)
- common_patch_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_patch_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "PatchBinFv.py"),
config["TARGET"], @@ -131,7 +131,7 @@ def post_build_ex(config, functions):
print("Patch Error!")
sys.exit(1)
- common_rebase_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_rebase_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "RebaseBinFv.py"),
config["TARGET"], diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
index 46fd389ef1..3b66df7115 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardTiogaPass/build_board.py
@@ -1,7 +1,7 @@
# @ build_board.py
# This adds additional functions to the build_bios.py # -# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2018 - 2023, Intel Corporation. All rights
+reserved.<BR>
# Copyright (c) 2021, American Megatrends International LLC.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -49,7 +49,7 @@ def pre_build_ex(config, functions):
print("AML_FILTER= ", config.get("AML_FILTER"))
# build the command with arguments
- command = ["python",
+ command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"AmlGenOffset",
"AmlGenOffset.py"), @@ -111,7 +111,7 @@ def post_build_ex(config, functions):
print("post_build_ex Error")
sys.exit(1)
- common_patch_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_patch_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "PatchBinFv.py"),
config["TARGET"], @@ -132,7 +132,7 @@ def post_build_ex(config, functions):
print("Patch Error!")
sys.exit(1)
- common_rebase_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_rebase_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "RebaseBinFv.py"),
config["TARGET"], @@ -161,7 +161,7 @@ def post_build_ex(config, functions):
print("Patch Error!")
sys.exit(1)
- common_patchbfv_command = [os.path.join(config["PYTHON_HOME"], "python"),
+ common_patchbfv_command = [sys.executable,
os.path.join(config["MIN_PACKAGE_TOOLS"],
"PatchFv", "PatchBfv.py"),
os.path.join(config["BUILD_DIR_PATH"],
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111827): https://edk2.groups.io/g/devel/message/111827
Mute This Topic: https://groups.io/mt/102862606/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME
[not found] <1798A43853ADB2B7.25909@groups.io>
@ 2023-11-29 0:03 ` Nate DeSimone
0 siblings, 0 replies; 9+ messages in thread
From: Nate DeSimone @ 2023-11-29 0:03 UTC (permalink / raw)
To: devel@edk2.groups.io; +Cc: Chiu, Chasel, Gao, Liming, Dong, Eric
Pushed as 073fbeb
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Nate DeSimone
Sent: Friday, November 17, 2023 10:36 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
Subject: [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME
Removes usage PYTHON_HOME from RebaseFspBinBaseAddress.py
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
.../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
index b7e4bcf5f9..32db9eb1c4 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py
@@ -1,6 +1,6 @@
## @ RebaseFspBinBaseAddress.py
#
-# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2019 - 2023, Intel Corporation. All rights
+reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent #
@@ -65,11 +65,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'
-else:
- pythontool = sys.executable
+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.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111828): https://edk2.groups.io/g/devel/message/111828
Mute This Topic: https://groups.io/mt/102667304/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-11-29 0:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-18 6:36 [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME Nate DeSimone
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name Nate DeSimone
2023-11-28 3:20 ` Chiu, Chasel
2023-11-18 6:36 ` [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: " Nate DeSimone
2023-11-28 3:19 ` Chiu, Chasel
2023-11-28 3:17 ` [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME Chiu, Chasel
[not found] ` <1798A438690A80D8.26894@groups.io>
2023-11-29 0:03 ` [edk2-devel] [edk2-platforms][PATCH v1] WhitleyOpenBoardPkg: Replace Python Interpreter Name Nate DeSimone
[not found] ` <1798A43863B4D009.26894@groups.io>
2023-11-29 0:03 ` [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: " Nate DeSimone
[not found] <1798A43853ADB2B7.25909@groups.io>
2023-11-29 0:03 ` [edk2-devel] [edk2-platforms][PATCH v1] MinPlatformPkg: Remove usage of PYTHON_HOME Nate DeSimone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox