FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-152715: Add pythoninfo-build command to Platforms/Apple by vstinner · Pull Request #152716 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
15 changes: 15 additions & 0 deletions Platforms/Apple/__main__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -754,6 +763,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)

Expand Down Expand Up @@ -909,6 +919,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",
Expand Down Expand Up @@ -967,6 +980,7 @@ def parse_args() -> argparse.Namespace:
clean,
configure_build,
make_build,
pythoninfo_build,
configure_host,
make_host,
build,
Expand Down Expand Up @@ -1078,6 +1092,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,
Expand Down
Loading

Back | FazBrowse Home | New Git URL