Skip to content

Commit ce97622

Browse files
[3.13] gh-152711: Add pythoninfo-build command to Platforms/Android (GH-152713) (#152727)
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 (cherry picked from commit fdcee4f) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 848cb25 commit ce97622

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Android/android.py

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

206206

207+
def pythoninfo_build_python(context):
208+
os.chdir(subdir("build"))
209+
run(["make", "pythoninfo"])
210+
211+
207212
# To create new builds of these dependencies, usually all that's necessary is to
208213
# push a tag to the cpython-android-source-deps repository, and GitHub Actions
209214
# will do the rest.
@@ -304,6 +309,7 @@ def build_targets(context):
304309
if context.target in {"all", "build"}:
305310
configure_build_python(context)
306311
make_build_python(context)
312+
pythoninfo_build_python(context)
307313

308314
for host in HOSTS:
309315
if context.target in {"all", "hosts", host}:
@@ -811,6 +817,7 @@ def ci(context):
811817
for step in [
812818
configure_build_python,
813819
make_build_python,
820+
pythoninfo_build_python,
814821
configure_host_python,
815822
make_host_python,
816823
package,
@@ -895,6 +902,8 @@ def add_parser(*args, **kwargs):
895902
"configure-build", help="Run `configure` for the build Python")
896903
add_parser(
897904
"make-build", help="Run `make` for the build Python")
905+
add_parser(
906+
"pythoninfo-build", help="Display build info of the build Python")
898907
configure_host = add_parser(
899908
"configure-host", help="Run `configure` for Android")
900909
make_host = add_parser(
@@ -1011,6 +1020,7 @@ def main():
10111020
dispatch = {
10121021
"configure-build": configure_build_python,
10131022
"make-build": make_build_python,
1023+
"pythoninfo-build": pythoninfo_build_python,
10141024
"configure-host": configure_host_python,
10151025
"make-host": make_host_python,
10161026
"build": build_targets,

0 commit comments

Comments
 (0)