diff options
-rwxr-xr-x | scripts/internal/print_wheels.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/internal/print_wheels.py b/scripts/internal/print_wheels.py index 5e5faccd..6b19909b 100755 --- a/scripts/internal/print_wheels.py +++ b/scripts/internal/print_wheels.py @@ -6,6 +6,7 @@ """Nicely print wheels print in dist/ directory.""" +import argparse import collections import glob import os @@ -67,8 +68,15 @@ class Wheel: def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('dir', nargs="?", default="dist", + help='directory containing tar.gz or wheel files') + args = parser.parse_args() + + if not os.path.isdir(args.dir): + raise NotADirectoryError(args.dir) groups = collections.defaultdict(list) - for path in glob.glob('dist/*.whl'): + for path in glob.glob('%s/*.whl' % args.dir): wheel = Wheel(path) groups[wheel.platform()].append(wheel) |