The implementation of the "build" command.
(context: argparse.Namespace, host: str | None = None)
| 743 | |
| 744 | |
| 745 | def 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 | |
| 778 | def test(context: argparse.Namespace, host: str | None = None) -> None: # noqa: PT028 |
no test coverage detected
searching dependent graphs…