Skip to content

Commit 8c65914

Browse files
committed
Remove Python 3.7 code paths
1 parent fee62ca commit 8c65914

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

distutils/command/install.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _resolve_scheme(name):
145145
try:
146146
resolved = sysconfig.get_preferred_scheme(key)
147147
except Exception:
148-
resolved = fw.scheme(_pypy_hack(name))
148+
resolved = fw.scheme(name)
149149
return resolved
150150

151151

@@ -162,7 +162,7 @@ def _inject_headers(name, scheme):
162162
"""
163163
# Bypass the preferred scheme, which may not
164164
# have defined headers.
165-
fallback = _load_scheme(_pypy_hack(name))
165+
fallback = _load_scheme(name)
166166
scheme.setdefault('headers', fallback['headers'])
167167
return scheme
168168

@@ -172,14 +172,6 @@ def _scheme_attrs(scheme):
172172
return {f'install_{key}': scheme[key] for key in SCHEME_KEYS}
173173

174174

175-
def _pypy_hack(name):
176-
PY37 = sys.version_info < (3, 8)
177-
old_pypy = hasattr(sys, 'pypy_version_info') and PY37
178-
prefix = not name.endswith(('_user', '_home'))
179-
pypy_name = 'pypy' + '_nt' * (os.name == 'nt')
180-
return pypy_name if old_pypy and prefix else name
181-
182-
183175
class install(Command):
184176
description = "install everything from build directory"
185177

distutils/sysconfig.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ def _extant(path):
156156

157157

158158
def _get_python_inc_posix(prefix, spec_prefix, plat_specific):
159-
if IS_PYPY and sys.version_info < (3, 8):
160-
return os.path.join(prefix, 'include')
161159
return (
162160
_get_python_inc_posix_python(plat_specific)
163161
or _extant(_get_python_inc_from_config(plat_specific, spec_prefix))
@@ -246,14 +244,6 @@ def get_python_lib(
246244
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
247245
"""
248246

249-
if IS_PYPY and sys.version_info < (3, 8):
250-
# PyPy-specific schema
251-
if prefix is None:
252-
prefix = PREFIX
253-
if standard_lib:
254-
return os.path.join(prefix, "lib-python", sys.version_info.major)
255-
return os.path.join(prefix, 'site-packages')
256-
257247
early_prefix = prefix
258248

259249
if prefix is None:

0 commit comments

Comments
 (0)