-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from promised-ai/release/v0.4-rc
Release/v0.4 rc
- Loading branch information
Showing
22 changed files
with
571 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python | ||
|
||
import argparse | ||
from packaging.tags import sys_tags | ||
import os.path | ||
import glob | ||
import sys | ||
|
||
parser = argparse.ArgumentParser( | ||
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("dir", help="the directory under which to search for the wheels") | ||
|
||
args=parser.parse_args() | ||
|
||
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) | ||
if len(matches) == 1: | ||
wheel=matches[0] | ||
break | ||
elif len(matches) > 1: | ||
print("Found multiple matches for the same tag " + str(tag), matches, file=sys.stderr) | ||
|
||
if wheel: | ||
print(os.path.join(args.dir, wheel)) | ||
else: | ||
sys.exit("Did not find compatible wheel") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.