Skip to content

Commit 9732230

Browse files
committed
Remove unused get_platform function
1 parent bb33eb0 commit 9732230

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

src/pip/_internal/pep425tags.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"""Generate and work with PEP 425 Compatibility Tags."""
22
from __future__ import absolute_import
33

4-
import distutils.util
54
import logging
6-
import platform
75
import re
86
import sys
97
import sysconfig
@@ -76,38 +74,6 @@ def get_impl_tag():
7674
return "{}{}".format(interpreter_name(), get_impl_ver())
7775

7876

79-
def _is_running_32bit():
80-
# type: () -> bool
81-
return sys.maxsize == 2147483647
82-
83-
84-
def get_platform():
85-
# type: () -> str
86-
"""Return our platform name 'win32', 'linux_x86_64'"""
87-
if sys.platform == 'darwin':
88-
# distutils.util.get_platform() returns the release based on the value
89-
# of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may
90-
# be significantly older than the user's current machine.
91-
release, _, machine = platform.mac_ver()
92-
split_ver = release.split('.')
93-
94-
if machine == "x86_64" and _is_running_32bit():
95-
machine = "i386"
96-
elif machine == "ppc64" and _is_running_32bit():
97-
machine = "ppc"
98-
99-
return 'macosx_{}_{}_{}'.format(split_ver[0], split_ver[1], machine)
100-
101-
# XXX remove distutils dependency
102-
result = distutils.util.get_platform().replace('.', '_').replace('-', '_')
103-
if result == "linux_x86_64" and _is_running_32bit():
104-
# 32 bit Python program (running on a 64 bit Linux): pip should only
105-
# install and run 32 bit compiled extensions in that case.
106-
result = "linux_i686"
107-
108-
return result
109-
110-
11177
def get_all_minor_versions_as_strings(version_info):
11278
# type: (Tuple[int, ...]) -> List[str]
11379
versions = []

0 commit comments

Comments
 (0)