https://github.com/python/cpython/commit/08e17722227e372131a07b61fa8625dd3b224057
commit: 08e17722227e372131a07b61fa8625dd3b224057
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: freakboy3742 <[email protected]>
date: 2026-07-01T03:18:34Z
summary:

[3.14] gh-152715: Add pythoninfo-build command to Platforms/Apple (GH-152716) 
(#152724)

Add a pythoninfo-build command to Platforms/Apple to display build
info of the build Python. The command runs "make pythoninfo".

The "ci" and "build" commands now also run "pythoninfo-build".
(cherry picked from commit 746c535a8e4cbf32af3d3ceba204c01d91614217)

Co-authored-by: Victor Stinner <[email protected]>

files:
M Apple/__main__.py

diff --git a/Apple/__main__.py b/Apple/__main__.py
index cfa94535a93393d..ec67265e02a081f 100644
--- a/Apple/__main__.py
+++ b/Apple/__main__.py
@@ -272,6 +272,15 @@ def make_build_python(context: argparse.Namespace) -> None:
         run(["make", "-j", str(os.cpu_count())])
 
 
+def pythoninfo_build_python(context: argparse.Namespace) -> None:
+    """The implementation of the "pythoninfo-build" command."""
+    with (
+        group("Display build info of the build Python"),
+        cwd(subdir("build")),
+    ):
+        run(["make", "pythoninfo"])
+
+
 def apple_target(host: str) -> str:
     """Return the Apple platform identifier for a given host triple."""
     for _, platform_slices in HOSTS.items():
@@ -751,6 +760,7 @@ def build(context: argparse.Namespace, host: str | None = 
None) -> None:
         for step in [
             configure_build_python,
             make_build_python,
+            pythoninfo_build_python,
         ]:
             step(context)
 
@@ -905,6 +915,9 @@ def parse_args() -> argparse.Namespace:
     make_build = subcommands.add_parser(
         "make-build", help="Run `make` for the build Python"
     )
+    pythoninfo_build = subcommands.add_parser(
+        "pythoninfo-build", help="Display build info of the build Python"
+    )
     configure_host = subcommands.add_parser(
         "configure-host",
         help="Run `configure` for a specific platform and target",
@@ -963,6 +976,7 @@ def parse_args() -> argparse.Namespace:
         clean,
         configure_build,
         make_build,
+        pythoninfo_build,
         configure_host,
         make_host,
         build,
@@ -1074,6 +1088,7 @@ def signal_handler(*args):
         "clean": clean,
         "configure-build": configure_build_python,
         "make-build": make_build_python,
+        "pythoninfo-build": pythoninfo_build_python,
         "configure-host": configure_host_python,
         "make-host": make_host_python,
         "package": package,

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to