Skip to content

Commit

Permalink
feat: Updated pyo3
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidmt committed May 1, 2024
1 parent f325faf commit a0147c3
Show file tree
Hide file tree
Showing 4 changed files with 266 additions and 244 deletions.
20 changes: 13 additions & 7 deletions .github/scripts/find_compatible_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,29 @@
description="Program to find wheels in a directory compatible with the current version of Python"
)

parser.add_argument("package", help="The name of the package that you are searching for a wheel for")
parser.add_argument(
"package", help="The name of the package that you are searching for a wheel for"
)
parser.add_argument("dir", help="the directory under which to search for the wheels")

args=parser.parse_args()
args = parser.parse_args()

wheel=None
wheel = None

for tag in sys_tags():
print(f"Looking for file matching tag {tag}", file=sys.stderr)
matches=glob.glob(args.package + "*" + str(tag) + "*.whl", root_dir=args.dir)
matches = glob.glob(f"{args.package}*{tag}*.whl", root_dir=args.dir)
if len(matches) == 1:
wheel=matches[0]
wheel = matches[0]
break
elif len(matches) > 1:
print("Found multiple matches for the same tag " + str(tag), matches, file=sys.stderr)
print(
"Found multiple matches for the same tag " + str(tag),
matches,
file=sys.stderr,
)

if wheel:
if wheel:
print(os.path.join(args.dir, wheel))
else:
sys.exit("Did not find compatible wheel")
Loading

0 comments on commit a0147c3

Please sign in to comment.