in tools/wheelmaker.py [0:0]
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Builds a python wheel")
metadata_group = parser.add_argument_group("Wheel name, version and platform")
metadata_group.add_argument(
"--name", required=True, type=str, help="Name of the distribution"
)
metadata_group.add_argument(
"--version", required=True, type=str, help="Version of the distribution"
)
metadata_group.add_argument(
"--build_tag",
type=str,
default="",
help="Optional build tag for the distribution",
)
metadata_group.add_argument(
"--python_tag",
type=str,
default="py3",
help="Python version, e.g. 'py2' or 'py3'",
)
metadata_group.add_argument("--abi", type=str, default="none")
metadata_group.add_argument(
"--platform", type=str, default="any", help="Target platform. "
)
output_group = parser.add_argument_group("Output file location")
output_group.add_argument(
"--out", type=str, default=None, help="Override name of ouptut file"
)
output_group.add_argument(
"--name_file",
type=Path,
help="A file where the canonical name of the " "wheel will be written",
)
output_group.add_argument(
"--strip_path_prefix",
type=str,
action="append",
default=[],
help="Path prefix to be stripped from input package files' path. "
"Can be supplied multiple times. "
"Evaluated in order.",
)
wheel_group = parser.add_argument_group("Wheel metadata")
wheel_group.add_argument(
"--header",
action="append",
help="Additional headers to be embedded in the package metadata. "
"Can be supplied multiple times.",
)
wheel_group.add_argument(
"--classifier",
action="append",
help="Classifiers to embed in package metadata. "
"Can be supplied multiple times",
)
wheel_group.add_argument(
"--python_requires", help="Version of python that the wheel will work with"
)
wheel_group.add_argument(
"--description_file", help="Path to the file with package description"
)
wheel_group.add_argument(
"--entry_points_file",
help="Path to a correctly-formatted entry_points.txt file",
)
contents_group = parser.add_argument_group("Wheel contents")
contents_group.add_argument(
"--input_file",
action="append",
help="'package_path;real_path' pairs listing "
"files to be included in the wheel. "
"Can be supplied multiple times.",
)
contents_group.add_argument(
"--input_file_list",
action="append",
help="A file that has all the input files defined as a list to avoid the long command",
)
requirements_group = parser.add_argument_group("Package requirements")
requirements_group.add_argument(
"--requires",
type=str,
action="append",
help="List of package requirements. Can be supplied multiple times.",
)
requirements_group.add_argument(
"--extra_requires",
type=str,
action="append",
help="List of optional requirements in a 'requirement;option name'. "
"Can be supplied multiple times.",
)
build_group = parser.add_argument_group("Building requirements")
build_group.add_argument(
"--volatile_status_file",
type=Path,
help="Pass in the stamp info file for stamping",
)
build_group.add_argument(
"--stable_status_file",
type=Path,
help="Pass in the stamp info file for stamping",
)
return parser.parse_args(sys.argv[1:])