Skip to content

Commit

Permalink
Use sysconfig for _aix_support and _osx_support
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Feb 4, 2021
1 parent 02faa59 commit b7245d6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)

Expand Down

0 comments on commit b7245d6

Please sign in to comment.