Skip to content

Commit fdcee4f

Browse files
authored
pythongh-152711: Add pythoninfo-build command to Platforms/Android (python#152713)
Add a pythoninfo-build command to Platforms/Android to display build info of the build Python. The command runs "make pythoninfo". ci and build commands now also run pythoninfo-build
1 parent 746c535 commit fdcee4f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Platforms/Android/__main__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ def make_build_python(context):
207207
run(["make", "-j", str(os.cpu_count())])
208208

209209

210+
def pythoninfo_build_python(context):
211+
os.chdir(subdir("build"))
212+
run(["make", "pythoninfo"])
213+
214+
210215
# To create new builds of these dependencies, usually all that's necessary is to
211216
# push a tag to the cpython-android-source-deps repository, and GitHub Actions
212217
# will do the rest.
@@ -308,6 +313,7 @@ def build_targets(context):
308313
if context.target in {"all", "build"}:
309314
configure_build_python(context)
310315
make_build_python(context)
316+
pythoninfo_build_python(context)
311317

312318
for host in HOSTS:
313319
if context.target in {"all", "hosts", host}:
@@ -819,6 +825,7 @@ def ci(context):
819825
for step in [
820826
configure_build_python,
821827
make_build_python,
828+
pythoninfo_build_python,
822829
configure_host_python,
823830
make_host_python,
824831
package,
@@ -903,6 +910,8 @@ def add_parser(*args, **kwargs):
903910
"configure-build", help="Run `configure` for the build Python")
904911
add_parser(
905912
"make-build", help="Run `make` for the build Python")
913+
add_parser(
914+
"pythoninfo-build", help="Display build info of the build Python")
906915
configure_host = add_parser(
907916
"configure-host", help="Run `configure` for Android")
908917
make_host = add_parser(
@@ -1019,6 +1028,7 @@ def main():
10191028
dispatch = {
10201029
"configure-build": configure_build_python,
10211030
"make-build": make_build_python,
1031+
"pythoninfo-build": pythoninfo_build_python,
10221032
"configure-host": configure_host_python,
10231033
"make-host": make_host_python,
10241034
"build": build_targets,

0 commit comments

Comments
 (0)