MCPcopy Index your code
hub / github.com/python/cpython / build

Function build

Platforms/Apple/__main__.py:745–775  ·  view source on GitHub ↗

The implementation of the "build" command.

(context: argparse.Namespace, host: str | None = None)

Source from the content-addressed store, hash-verified

743
744
745def build(context: argparse.Namespace, host: str | None = None) -> None:
746 """The implementation of the "build" command."""
747 if host is None:
748 host = context.host
749
750 if context.clean:
751 clean(context, host)
752
753 if host in {"all", "build"}:
754 for step in [
755 configure_build_python,
756 make_build_python,
757 ]:
758 step(context)
759
760 if host == "build":
761 hosts = []
762 elif host in {"all", "hosts"}:
763 hosts = all_host_triples(context.platform)
764 else:
765 hosts = [host]
766
767 for step_host in hosts:
768 for step in [
769 configure_host_python,
770 make_host_python,
771 ]:
772 step(context, host=step_host)
773
774 if host == "all":
775 package(context)
776
777
778def test(context: argparse.Namespace, host: str | None = None) -> None: # noqa: PT028

Callers 1

ciFunction · 0.70

Calls 3

all_host_triplesFunction · 0.85
cleanFunction · 0.70
packageFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…