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

Function parse_args

pythonbuild/mirror.py:45–70  ·  view source on GitHub ↗
(argv: Sequence[str] | None = None)

Source from the content-addressed store, hash-verified

43
44
45def parse_args(argv: Sequence[str] | None = None) -> argparse.Namespace:
46 parser = argparse.ArgumentParser(
47 description="Upload release distributions to an S3-compatible mirror bucket"
48 )
49 parser.add_argument(
50 "--dist", type=Path, required=True, help="Directory with release artifacts"
51 )
52 parser.add_argument("--tag", required=True, help="Release tag")
53 parser.add_argument("--bucket", required=True, help="S3 bucket name")
54 parser.add_argument(
55 "--prefix",
56 default="",
57 help="Key prefix within the bucket (e.g. 'github/python-build-standalone/releases/download/20250317/')",
58 )
59 parser.add_argument(
60 "-n",
61 "--dry-run",
62 action="store_true",
63 help="Dry run mode; do not actually upload",
64 )
65 parser.add_argument(
66 "--ignore-missing",
67 action="store_true",
68 help="Continue even if there are missing artifacts",
69 )
70 return parser.parse_args(argv)
71
72
73def infer_build_datetime(dist_dir: Path) -> str:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected