@@ -604,9 +604,11 @@ def add_cross_build_dir_option(subcommand):
604604 action = "store" ,
605605 default = os .environ .get ("CROSS_BUILD_DIR" ),
606606 dest = "cross_build_dir" ,
607- help = "Path to the cross-build directory "
608- f"(default: { DEFAULT_CROSS_BUILD_DIR } ). "
609- "Can also be set with the CROSS_BUILD_DIR environment variable." ,
607+ help = (
608+ "Path to the cross-build directory "
609+ f"(default: { DEFAULT_CROSS_BUILD_DIR } ). "
610+ "Can also be set with the CROSS_BUILD_DIR environment variable." ,
611+ ),
610612 )
611613
612614
@@ -615,10 +617,12 @@ def main():
615617
616618 parser = argparse .ArgumentParser ()
617619 subcommands = parser .add_subparsers (dest = "subcommand" )
620+
618621 install_emscripten_cmd = subcommands .add_parser (
619622 "install-emscripten" ,
620623 help = "Install the appropriate version of Emscripten" ,
621624 )
625+
622626 build = subcommands .add_parser ("build" , help = "Build everything" )
623627 build .add_argument (
624628 "target" ,
@@ -634,33 +638,44 @@ def main():
634638 configure_build = subcommands .add_parser (
635639 "configure-build-python" , help = "Run `configure` for the build Python"
636640 )
641+
637642 make_mpdec_cmd = subcommands .add_parser (
638643 "make-mpdec" ,
639644 help = "Clone mpdec repo, configure and build it for emscripten" ,
640645 )
646+
641647 make_libffi_cmd = subcommands .add_parser (
642648 "make-libffi" ,
643649 help = "Clone libffi repo, configure and build it for emscripten" ,
644650 )
651+
645652 make_build = subcommands .add_parser (
646653 "make-build-python" , help = "Run `make` for the build Python"
647654 )
655+
648656 configure_host = subcommands .add_parser (
649657 "configure-host" ,
650- help = "Run `configure` for the host/emscripten (pydebug builds are inferred from the build Python)" ,
658+ help = (
659+ "Run `configure` for the host/emscripten "
660+ "(pydebug builds are inferred from the build Python)"
661+ ),
651662 )
663+
652664 make_host = subcommands .add_parser (
653665 "make-host" , help = "Run `make` for the host/emscripten"
654666 )
667+
655668 run = subcommands .add_parser (
656669 "run" ,
657670 help = "Run the built emscripten Python" ,
658671 )
659672 run .add_argument (
660673 "args" ,
661674 nargs = argparse .REMAINDER ,
662- help = "Arguments to pass to the emscripten Python "
663- "(use '--' to separate from run options)" ,
675+ help = (
676+ "Arguments to pass to the emscripten Python "
677+ "(use '--' to separate from run options)" ,
678+ )
664679 )
665680 add_cross_build_dir_option (run )
666681 clean = subcommands .add_parser (
@@ -693,19 +708,24 @@ def main():
693708 action = "store_true" ,
694709 default = "QUIET" in os .environ ,
695710 dest = "quiet" ,
696- help = "Redirect output from subprocesses to a log file. "
697- "Can also be set with the QUIET environment variable." ,
711+ help = (
712+ "Redirect output from subprocesses to a log file. "
713+ "Can also be set with the QUIET environment variable."
714+ ),
698715 )
699716 add_cross_build_dir_option (subcommand )
700717 subcommand .add_argument (
701718 "--emsdk-cache" ,
702719 action = "store" ,
703720 default = os .environ .get ("EMSDK_CACHE" ),
704721 dest = "emsdk_cache" ,
705- help = "Path to emsdk cache directory. If provided, validates that "
706- "the required emscripten version is installed. "
707- "Can also be set with the EMSDK_CACHE environment variable." ,
722+ help = (
723+ "Path to emsdk cache directory. If provided, validates that "
724+ "the required emscripten version is installed. "
725+ "Can also be set with the EMSDK_CACHE environment variable."
726+ ),
708727 )
728+
709729 for subcommand in configure_build , configure_host :
710730 subcommand .add_argument (
711731 "--clean" ,
@@ -714,10 +734,12 @@ def main():
714734 dest = "clean" ,
715735 help = "Delete any relevant directories before building" ,
716736 )
737+
717738 for subcommand in build , configure_build , configure_host :
718739 subcommand .add_argument (
719740 "args" , nargs = "*" , help = "Extra arguments to pass to `configure`"
720741 )
742+
721743 for subcommand in build , configure_host :
722744 subcommand .add_argument (
723745 "--host-runner" ,
0 commit comments