MCPcopy Create free account
hub / github.com/astral-sh/python-build-standalone / parse_args

Function parse_args

ci-matrix.py:501–541  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

499
500
501def parse_args() -> argparse.Namespace:
502 parser = argparse.ArgumentParser(
503 description="Generate a JSON matrix for building distributions in CI"
504 )
505 parser.add_argument(
506 "--platform",
507 choices=["darwin", "linux", "windows"],
508 help="Filter matrix entries by platform",
509 )
510 parser.add_argument(
511 "--max-shards",
512 type=int,
513 default=0,
514 help="The maximum number of shards allowed; set to zero to disable ",
515 )
516 parser.add_argument(
517 "--labels",
518 help="Comma-separated list of labels to filter by (e.g., 'platform:linux,python:3.13')",
519 )
520 parser.add_argument(
521 "--event",
522 choices=["pull_request", "push"],
523 help="The GitHub event type. When 'pull_request', uses ci-defaults.yaml for the default subset.",
524 )
525 parser.add_argument(
526 "--free-runners",
527 action="store_true",
528 help="If only free runners should be used.",
529 )
530 parser.add_argument(
531 "--force-crate-build",
532 action="store_true",
533 help="Force crate builds to be included even without python builds.",
534 )
535 parser.add_argument(
536 "--matrix-type",
537 choices=["python-build", "docker-build", "crate-build", "all"],
538 default="all",
539 help="Which matrix types to generate (default: all)",
540 )
541 return parser.parse_args()
542
543
544def main() -> None:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected