Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
926c80f5
Commit
926c80f5
authored
Nov 25, 2019
by
Benoit Pierre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wheel: fix `is_compatible` implementation
parent
d155aa0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
changelog.d/1918.change.rst
changelog.d/1918.change.rst
+1
-0
setuptools/tests/test_wheel.py
setuptools/tests/test_wheel.py
+9
-0
setuptools/wheel.py
setuptools/wheel.py
+1
-1
No files found.
changelog.d/1918.change.rst
0 → 100644
View file @
926c80f5
Fix regression in handling wheels compatibility tags.
setuptools/tests/test_wheel.py
View file @
926c80f5
...
...
@@ -18,6 +18,7 @@ import pytest
from
pkg_resources
import
Distribution
,
PathMetadata
,
PY_MAJOR
from
setuptools.extern.packaging.utils
import
canonicalize_name
from
setuptools.extern.packaging.tags
import
parse_tag
from
setuptools.wheel
import
Wheel
from
.contexts
import
tempdir
...
...
@@ -571,3 +572,11 @@ def test_wheel_no_dist_dir():
_check_wheel_install
(
wheel_path
,
install_dir
,
None
,
project_name
,
version
,
None
)
def
test_wheel_is_compatible
(
monkeypatch
):
def
sys_tags
():
for
t
in
parse_tag
(
'cp36-cp36m-manylinux1_x86_64'
):
yield
t
monkeypatch
.
setattr
(
'setuptools.wheel.sys_tags'
,
sys_tags
)
assert
Wheel
(
'onnxruntime-0.1.2-cp36-cp36m-manylinux1_x86_64.whl'
).
is_compatible
()
setuptools/wheel.py
View file @
926c80f5
...
...
@@ -77,7 +77,7 @@ class Wheel:
def is_compatible(self):
'''Is the wheel is compatible with the current platform?'''
supported_tags = set(
map(str, sys_tags()
))
supported_tags = set(
(t.interpreter, t.abi, t.platform) for t in sys_tags(
))
return next((True for t in self.tags() if t in supported_tags), False)
def egg_name(self):
...
...
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