@@ -272,6 +272,15 @@ def make_build_python(context: argparse.Namespace) -> None:
272272 run (["make" , "-j" , str (os .cpu_count ())])
273273
274274
275+ def pythoninfo_build_python (context : argparse .Namespace ) -> None :
276+ """The implementation of the "pythoninfo-build" command."""
277+ with (
278+ group ("Display build info of the build Python" ),
279+ cwd (subdir ("build" )),
280+ ):
281+ run (["make" , "pythoninfo" ])
282+
283+
275284def apple_target (host : str ) -> str :
276285 """Return the Apple platform identifier for a given host triple."""
277286 for _ , platform_slices in HOSTS .items ():
@@ -754,6 +763,7 @@ def build(context: argparse.Namespace, host: str | None = None) -> None:
754763 for step in [
755764 configure_build_python ,
756765 make_build_python ,
766+ pythoninfo_build_python ,
757767 ]:
758768 step (context )
759769
@@ -909,6 +919,9 @@ def parse_args() -> argparse.Namespace:
909919 make_build = subcommands .add_parser (
910920 "make-build" , help = "Run `make` for the build Python"
911921 )
922+ pythoninfo_build = subcommands .add_parser (
923+ "pythoninfo-build" , help = "Display build info of the build Python"
924+ )
912925 configure_host = subcommands .add_parser (
913926 "configure-host" ,
914927 help = "Run `configure` for a specific platform and target" ,
@@ -967,6 +980,7 @@ def parse_args() -> argparse.Namespace:
967980 clean ,
968981 configure_build ,
969982 make_build ,
983+ pythoninfo_build ,
970984 configure_host ,
971985 make_host ,
972986 build ,
@@ -1078,6 +1092,7 @@ def signal_handler(*args):
10781092 "clean" : clean ,
10791093 "configure-build" : configure_build_python ,
10801094 "make-build" : make_build_python ,
1095+ "pythoninfo-build" : pythoninfo_build_python ,
10811096 "configure-host" : configure_host_python ,
10821097 "make-host" : make_host_python ,
10831098 "package" : package ,
0 commit comments