"vscode:/vscode.git/clone" did not exist on "7639d0bdecff280b8d6570ac4eb09ec952f1f78c"
supported_wheels.py 541 Bytes
Newer Older
1
2
3
4
5
6
7
8
#!/usr/bin/env python
"""  Filter out wheel filenames not supported on this platform
"""
from __future__ import print_function

import sys

from wheel.install import WheelFile
9
10
11
12
try:
    from pip.pep425tags import get_supported
except ImportError:  # pip 10
    from pip._internal.pep425tags import get_supported
13
14
15
16
17
18
19
20
21
22
23
24


def main():
    supported = set(get_supported())
    for fname in sys.argv[1:]:
        tags = set(WheelFile(fname).tags)
        if supported.intersection(tags):
            print(fname)


if __name__ == '__main__':
    main()