Files
sqlalchemy/.github/workflows/scripts/can_install.py
T
Federico Caselli e7875b39f8 Fix wheel check in linux workflow and improve it
Change-Id: I3b208674649e41bca0285d00aa11cc5975eb971a
2020-08-17 23:48:21 +02:00

25 lines
613 B
Python

import sys
from packaging import tags
to_check = "--"
found = False
if len(sys.argv) > 1:
to_check = sys.argv[1]
for t in tags.sys_tags():
start = "-".join(str(t).split("-")[:2])
if to_check.lower() == start:
print(
"Wheel tag {0} matches installed version {1}.".format(
to_check, t
)
)
found = True
break
if not found:
print(
"Wheel tag {0} not found in installed version tags {1}.".format(
to_check, [str(t) for t in tags.sys_tags()]
)
)
exit(1)