From a6fa4839ba1c74a37cb43eefb959c0766594ec63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Mon, 8 Feb 2021 23:20:45 +0200 Subject: [PATCH] Updated vendored packaging to v20.9 --- docs/news.rst | 4 ++++ src/wheel/vendored/packaging/tags.py | 24 +++++++++++++++++++----- src/wheel/vendored/vendor.txt | 2 +- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/news.rst b/docs/news.rst index f2cd7614..193f4a26 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,10 @@ Release Notes ============= +**UNRELEASED** + +- Updated vendored ``packaging`` library to v20.9 + **0.36.2 (2020-12-13)** - Updated vendored ``packaging`` library to v20.8 diff --git a/src/wheel/vendored/packaging/tags.py b/src/wheel/vendored/packaging/tags.py index 3306c690..c2a140c2 100644 --- a/src/wheel/vendored/packaging/tags.py +++ b/src/wheel/vendored/packaging/tags.py @@ -458,14 +458,28 @@ def mac_platforms(version=None, arch=None): major=major_version, minor=0, binary_format=binary_format ) - if version >= (11, 0) and arch == "x86_64": + if version >= (11, 0): # Mac OS 11 on x86_64 is compatible with binaries from previous releases. # Arm64 support was introduced in 11.0, so no Arm binaries from previous # releases exist. - for minor_version in range(16, 3, -1): - compat_version = 10, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: + # + # However, the "universal2" binary format can have a + # macOS version earlier than 11.0 when the x86_64 part of the binary supports + # that version of macOS. + if arch == "x86_64": + for minor_version in range(16, 3, -1): + compat_version = 10, minor_version + binary_formats = _mac_binary_formats(compat_version, arch) + for binary_format in binary_formats: + yield "macosx_{major}_{minor}_{binary_format}".format( + major=compat_version[0], + minor=compat_version[1], + binary_format=binary_format, + ) + else: + for minor_version in range(16, 3, -1): + compat_version = 10, minor_version + binary_format = "universal2" yield "macosx_{major}_{minor}_{binary_format}".format( major=compat_version[0], minor=compat_version[1], diff --git a/src/wheel/vendored/vendor.txt b/src/wheel/vendored/vendor.txt index 99f51222..57233e13 100644 --- a/src/wheel/vendored/vendor.txt +++ b/src/wheel/vendored/vendor.txt @@ -1 +1 @@ -packaging==20.8 +packaging==20.9