Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
0623c582
Commit
0623c582
authored
Sep 29, 2018
by
Matthew Brett
Browse files
Further fix to supported_wheels
New wheel 0.32.0 has comprehensively changed the API.
parent
f6128176
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
supported_wheels.py
supported_wheels.py
+14
-3
No files found.
supported_wheels.py
View file @
0623c582
...
...
@@ -4,21 +4,32 @@
from
__future__
import
print_function
import
sys
from
os.path
import
basename
try
:
from
wheel.install
import
W
heelFile
from
wheel.install
import
W
HEEL_INFO_RE
except
ImportError
:
# As of Wheel 0.32.0
from
wheel.wheelfile
import
W
heelFile
from
wheel.wheelfile
import
W
HEEL_INFO_RE
try
:
from
pip.pep425tags
import
get_supported
except
ImportError
:
# pip 10
from
pip._internal.pep425tags
import
get_supported
def
tags_for
(
fname
):
# Copied from WheelFile code
parsed_filename
=
WHEEL_INFO_RE
.
match
(
basename
(
fname
))
tags
=
parsed_filename
.
groupdict
()
for
pyver
in
tags
[
'pyver'
].
split
(
'.'
):
for
abi
in
tags
[
'abi'
].
split
(
'.'
):
for
plat
in
tags
[
'plat'
].
split
(
'.'
):
yield
(
pyver
,
abi
,
plat
)
def
main
():
supported
=
set
(
get_supported
())
for
fname
in
sys
.
argv
[
1
:]:
tags
=
set
(
WheelFile
(
fname
)
.
tags
)
tags
=
set
(
tags_for
(
fname
))
if
supported
.
intersection
(
tags
):
print
(
fname
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment