| """A utility for generating the output directory for `py_wheel_dist`.""" |
| def parse_args() -> argparse.Namespace: |
| """Parse command line arguments.""" |
| parser = argparse.ArgumentParser() |
| "--wheel", type=Path, required=True, help="The path to a wheel." |
| help="A file containing the sanitized name of the wheel.", |
| help="The output location to copy the wheel to.", |
| return parser.parse_args() |
| """The main entrypoint.""" |
| wheel_name = args.name_file.read_text(encoding="utf-8").strip() |
| args.output.mkdir(exist_ok=True, parents=True) |
| shutil.copyfile(args.wheel, args.output / wheel_name) |
| if __name__ == "__main__": |