[edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name

Nate DeSimone posted 1 patch 5 months, 1 week ago
Failed in applying to current master (apply log)
.../PurleyOpenBoardPkg/BoardMtOlympus/build_board.py   |  8 ++++----
.../PurleyOpenBoardPkg/BoardTiogaPass/build_board.py   | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
[edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name
Posted by Nate DeSimone 5 months, 1 week ago
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/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-platforms][PATCH v1] PurleyOpenBoardPkg: Replace Python Interpreter Name
Posted by Chiu, Chasel 5 months ago
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/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-