Imported Upstream version 42.0.1 upstream/42.0.1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:04:33 +0000 (07:04 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 29 Dec 2020 22:04:33 +0000 (07:04 +0900)
.bumpversion.cfg
CHANGES.rst
setup.cfg
setuptools/tests/test_wheel.py
setuptools/wheel.py

index 0551f1b044637b34188e0ff2f04ec2079f1c31a8..e37acce5f92a74e80459e7d05c924d8c65f1f2de 100644 (file)
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 42.0.0
+current_version = 42.0.1
 commit = True
 tag = True
 
index 0a8696c2a86b1f0a5628092ef6821e1d93987e90..da657c28018996d04973bd65f2aae88664e73b7c 100644 (file)
@@ -1,3 +1,9 @@
+v42.0.1
+-------
+
+* #1918: Fix regression in handling wheels compatibility tags.
+
+
 v42.0.0
 -------
 
index c0aa35bae5f4a3de08b031f9e1ae4159f5538b85..b8e542798ad353537783df9ce293c8e472f91e2f 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -19,7 +19,7 @@ universal = 1
 
 [metadata]
 name = setuptools
-version = 42.0.0
+version = 42.0.1
 description = Easily download, build, install, upgrade, and uninstall Python packages
 author = Python Packaging Authority
 author_email = distutils-sig@python.org
index d50816c22ad2fc5f4ea4c2f4c3b304263fa0b5bf..55d346c67cdf310241b00e88305168414fd88bb1 100644 (file)
@@ -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()
index 3effd79b3f968203a118b6bae5f99c7ebeffbbe2..025aaa828a24cb7746e5fac9b66984d5b9794bc3 100644 (file)
@@ -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):