Unverified Commit 79912bb8 authored by Cosimo Lupo's avatar Cosimo Lupo
Browse files

supported_wheels.py: in pip 20, get_supported() returns list of Tags

Fixes https://github.com/matthew-brett/multibuild/issues/298
parent 24d35a4a
......@@ -28,7 +28,12 @@ def tags_for(fname):
def main():
supported = set(get_supported())
# Up to pip < 20, get_supported() returns a list of tuples; from pip >= 20,
# it returns a list of packaging.tags.Tag objects. We try to support both.
supported = {
(tag.interpreter, tag.abi, tag.platform) if not isinstance(tag, tuple) else tag
for tag in get_supported()
}
for fname in sys.argv[1:]:
tags = set(tags_for(fname))
if supported.intersection(tags):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment