Skip to content

Commit 38036eb

Browse files
[3.14] gh-152711: Add pythoninfo-build command to Platforms/Android (GH-152713) (#152726)
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 67d4cbf commit 38036eb

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.
@@ -305,6 +310,7 @@ def build_targets(context):
305310
if context.target in {"all", "build"}:
306311
configure_build_python(context)
307312
make_build_python(context)
313+
pythoninfo_build_python(context)
308314

309315
for host in HOSTS:
310316
if context.target in {"all", "hosts", host}:
@@ -812,6 +818,7 @@ def ci(context):
812818
for step in [
813819
configure_build_python,
814820
make_build_python,
821+
pythoninfo_build_python,
815822
configure_host_python,
816823
make_host_python,
817824
package,
@@ -896,6 +903,8 @@ def add_parser(*args, **kwargs):
896903
"configure-build", help="Run `configure` for the build Python")
897904
add_parser(
898905
"make-build", help="Run `make` for the build Python")
906+
add_parser(
907+
"pythoninfo-build", help="Display build info of the build Python")
899908
configure_host = add_parser(
900909
"configure-host", help="Run `configure` for Android")
901910
make_host = add_parser(
@@ -1012,6 +1021,7 @@ def main():
10121021
dispatch = {
10131022
"configure-build": configure_build_python,
10141023
"make-build": make_build_python,
1024+
"pythoninfo-build": pythoninfo_build_python,
10151025
"configure-host": configure_host_python,
10161026
"make-host": make_host_python,
10171027
"build": build_targets,

0 commit comments

Comments
 (0)