Skip to content

Commit 40102b4

Browse files
committed
Remove unused get_platform function
Now handled internally in `packaging.tags` (in `_platform_tags`).
1 parent 9574da5 commit 40102b4

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

@@ -49,38 +47,6 @@ def get_impl_version_info():
4947
return sys.version_info[0], sys.version_info[1]
5048

5149

52-
def _is_running_32bit():
53-
# type: () -> bool
54-
return sys.maxsize == 2147483647
55-
56-
57-
def get_platform():
58-
# type: () -> str
59-
"""Return our platform name 'win32', 'linux_x86_64'"""
60-
if sys.platform == 'darwin':
61-
# distutils.util.get_platform() returns the release based on the value
62-
# of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may
63-
# be significantly older than the user's current machine.
64-
release, _, machine = platform.mac_ver()
65-
split_ver = release.split('.')
66-
67-
if machine == "x86_64" and _is_running_32bit():
68-
machine = "i386"
69-
elif machine == "ppc64" and _is_running_32bit():
70-
machine = "ppc"
71-
72-
return 'macosx_{}_{}_{}'.format(split_ver[0], split_ver[1], machine)
73-
74-
# XXX remove distutils dependency
75-
result = distutils.util.get_platform().replace('.', '_').replace('-', '_')
76-
if result == "linux_x86_64" and _is_running_32bit():
77-
# 32 bit Python program (running on a 64 bit Linux): pip should only
78-
# install and run 32 bit compiled extensions in that case.
79-
result = "linux_i686"
80-
81-
return result
82-
83-
8450
def get_all_minor_versions_as_strings(version_info):
8551
# type: (Tuple[int, ...]) -> List[str]
8652
versions = []

0 commit comments

Comments
 (0)