Skip to content

Commit

Permalink
Replace distutils usage with sysconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Feb 5, 2021
1 parent c8a2f0b commit e59aa3a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from __future__ import absolute_import

import distutils.util

try:
from importlib.machinery import EXTENSION_SUFFIXES
except ImportError: # pragma: no cover
Expand Down Expand Up @@ -611,7 +609,7 @@ def _parse_glibc_version(version_str):
return (int(m.group("major")), int(m.group("minor")))


_glibc_version = [] # type: List[Tuple[int, int]]
_glibc_version = [] # type: List[Tuple[int, int]]


def _get_glibc_version():
Expand Down Expand Up @@ -781,7 +779,7 @@ def _manylinux_tags(linux, arch):

def _linux_platforms(is_32bit=_32_BIT_INTERPRETER):
# type: (bool) -> Iterator[str]
linux = _normalize_string(distutils.util.get_platform())
linux = _normalize_string(sysconfig.get_platform())
if is_32bit:
if linux == "linux_x86_64":
linux = "linux_i686"
Expand All @@ -796,7 +794,7 @@ def _linux_platforms(is_32bit=_32_BIT_INTERPRETER):

def _generic_platforms():
# type: () -> Iterator[str]
yield _normalize_string(distutils.util.get_platform())
yield _normalize_string(sysconfig.get_platform())


def _platform_tags():
Expand Down

0 comments on commit e59aa3a

Please sign in to comment.