|
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 |
|
@@ -49,38 +47,6 @@ def get_impl_version_info():
|
49 | 47 | return sys.version_info[0], sys.version_info[1]
|
50 | 48 |
|
51 | 49 |
|
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 |
| - |
84 | 50 | def get_all_minor_versions_as_strings(version_info):
|
85 | 51 | # type: (Tuple[int, ...]) -> List[str]
|
86 | 52 | versions = []
|
|
0 commit comments