File: tag_pure_wheels.py

package info (click to toggle)
pymediainfo 7.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 668 kB
  • sloc: python: 988; xml: 464; makefile: 15
file content (18 lines) | stat: -rwxr-xr-x 559 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python3

# ruff: noqa: T201
"""Tags all pure Python wheels from the 'dist' folder."""

import argparse
import pathlib

from wheel.cli.tags import tags

if __name__ == "__main__":
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("platform_tag", help="the tag to add")
    args = parser.parse_args()

    for wheel_path in pathlib.Path("dist").glob("*-py3-none-any.whl"):
        new_wheel = tags(wheel_path, platform_tags=args.platform_tag, remove=True)
        print(f"Tagged {wheel_path.name} -> {new_wheel}")