Skip to content

Commit

Permalink
Build: Avoid redundant output in dedup script.
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder committed Mar 31, 2024
1 parent 3c5cc9e commit b13d25b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dedup_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,14 @@ def main(wheel_dir: str, delete=True):
all_wheels = list(list_wheels(wheel_path))
wheels = dedup_wheels(all_wheels)
redundant = set(all_wheels).difference(wheels)
if not redundant:
return

print("Redundant wheels found:")
print_wheels(redundant)

if delete:
for wheel in redundant:
for wheel in sorted(redundant):
print(f"deleting {wheel}")
os.unlink(wheel_path / wheel)
elif redundant:
print("Redundant wheels found:")
print_wheels(redundant)


def parse_args(args):
Expand Down

0 comments on commit b13d25b

Please sign in to comment.