|
1 | 1 | """Generate and work with PEP 425 Compatibility Tags.""" |
2 | 2 | from __future__ import absolute_import |
3 | 3 |
|
4 | | -import distutils.util |
5 | 4 | import logging |
6 | | -import platform |
7 | 5 | import re |
8 | 6 | import sys |
9 | 7 | import sysconfig |
@@ -76,38 +74,6 @@ def get_impl_tag(): |
76 | 74 | return "{}{}".format(interpreter_name(), get_impl_ver()) |
77 | 75 |
|
78 | 76 |
|
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 | | - |
111 | 77 | def get_all_minor_versions_as_strings(version_info): |
112 | 78 | # type: (Tuple[int, ...]) -> List[str] |
113 | 79 | versions = [] |
|
0 commit comments