Remove unused get_platform function
Now handled internally in `packaging.tags` (in `_platform_tags`).
"""Generate and work with PEP 425 Compatibility Tags."""
from __future__ import absolute_import
-import distutils.util
import logging
-import platform
import re
import sys
@@ -49,38 +47,6 @@ def get_impl_version_info():
return sys.version_info[0], sys.version_info[1]
-def _is_running_32bit():
- # type: () -> bool
- return sys.maxsize == 2147483647
-
-
-def get_platform():
- # type: () -> str
- """Return our platform name 'win32', 'linux_x86_64'"""
- if sys.platform == 'darwin':
- # distutils.util.get_platform() returns the release based on the value
- # of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may
- # be significantly older than the user's current machine.
- release, _, machine = platform.mac_ver()
- split_ver = release.split('.')
-
- if machine == "x86_64" and _is_running_32bit():
- machine = "i386"
- elif machine == "ppc64" and _is_running_32bit():
- machine = "ppc"
-
- return 'macosx_{}_{}_{}'.format(split_ver[0], split_ver[1], machine)
-
- # XXX remove distutils dependency
- result = distutils.util.get_platform().replace('.', '_').replace('-', '_')
- if result == "linux_x86_64" and _is_running_32bit():
- # 32 bit Python program (running on a 64 bit Linux): pip should only
- # install and run 32 bit compiled extensions in that case.
- result = "linux_i686"
-
- return result
-
-
def get_all_minor_versions_as_strings(version_info):
# type: (Tuple[int, ...]) -> List[str]
versions = []
