From b7245d661b53e50d147109972891273cb098e9fd Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Thu, 4 Feb 2021 10:14:35 +0800 Subject: [PATCH] Use sysconfig for _aix_support and _osx_support --- packaging/tags.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packaging/tags.py b/packaging/tags.py index 3e33adc6e..9bef0fdbb 100644 --- a/packaging/tags.py +++ b/packaging/tags.py @@ -842,9 +842,9 @@ def _get_host_platform(): machine += ".{}".format(bitness[sys.maxsize]) # fall through to standard osname-release-machine representation elif osname[:3] == "aix": - from _aix_support import aix_platform + import sysconfig - return cast(str, aix_platform()) + return sysconfig.get_platform() elif osname[:6] == "cygwin": osname = "cygwin" if PY2: # Python 2 does not have re.ASCII. @@ -856,11 +856,8 @@ def _get_host_platform(): release = m.group() elif osname[:6] == "darwin": import sysconfig - import _osx_support - osname, release, machine = _osx_support.get_platform_osx( - sysconfig.get_config_vars(), osname, release, machine - ) + return sysconfig.get_platform() return "{}-{}-{}".format(osname, release, machine)