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

Function main

Platforms/emscripten/__main__.py:658–859  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

656
657
658def main():
659 parser = argparse.ArgumentParser()
660 subcommands = parser.add_subparsers(dest="subcommand")
661
662 install_emscripten_cmd = subcommands.add_parser(
663 "install-emscripten",
664 help="Install the appropriate version of Emscripten",
665 )
666
667 build = subcommands.add_parser("build", help="Build everything")
668 build.add_argument(
669 "target",
670 nargs="?",
671 default="all",
672 choices=["all", "host", "build"],
673 help=(
674 "What should be built. 'build' for just the build platform, or "
675 "'host' for the host platform, or 'all' for both. Defaults to 'all'."
676 ),
677 )
678
679 configure_build = subcommands.add_parser(
680 "configure-build-python", help="Run `configure` for the build Python"
681 )
682
683 make_mpdec_cmd = subcommands.add_parser(
684 "make-mpdec",
685 help="Clone mpdec repo, configure and build it for emscripten",
686 )
687
688 make_libffi_cmd = subcommands.add_parser(
689 "make-libffi",
690 help="Clone libffi repo, configure and build it for emscripten",
691 )
692
693 make_dependencies_cmd = subcommands.add_parser(
694 "make-dependencies",
695 help="Build all static library dependencies",
696 )
697
698 for cmd in [make_mpdec_cmd, make_libffi_cmd, make_dependencies_cmd]:
699 cmd.add_argument(
700 "--check-up-to-date",
701 action="store_true",
702 default=False,
703 help=("If passed, will fail if dependency is out of date"),
704 )
705
706 make_build = subcommands.add_parser(
707 "make-build-python", help="Run `make` for the build Python"
708 )
709
710 configure_host = subcommands.add_parser(
711 "configure-host",
712 help=(
713 "Run `configure` for the host/emscripten "
714 "(pydebug builds are inferred from the build Python)"
715 ),

Callers 1

__main__.pyFile · 0.70

Calls 13

add_subparsersMethod · 0.95
parse_argsMethod · 0.95
print_helpMethod · 0.95
PathClass · 0.90
get_build_pathsFunction · 0.85
add_parserMethod · 0.80
absoluteMethod · 0.80
add_argumentMethod · 0.45
getMethod · 0.45
joinMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…