Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions distutils/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _resolve_scheme(name):
try:
resolved = sysconfig.get_preferred_scheme(key)
except Exception:
resolved = fw.scheme(_pypy_hack(name))
resolved = fw.scheme(name)
return resolved


Expand All @@ -162,7 +162,7 @@ def _inject_headers(name, scheme):
"""
# Bypass the preferred scheme, which may not
# have defined headers.
fallback = _load_scheme(_pypy_hack(name))
fallback = _load_scheme(name)
scheme.setdefault('headers', fallback['headers'])
return scheme

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


def _pypy_hack(name):
PY37 = sys.version_info < (3, 8)
old_pypy = hasattr(sys, 'pypy_version_info') and PY37
prefix = not name.endswith(('_user', '_home'))
pypy_name = 'pypy' + '_nt' * (os.name == 'nt')
return pypy_name if old_pypy and prefix else name


class install(Command):
description = "install everything from build directory"

Expand Down
10 changes: 0 additions & 10 deletions distutils/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ def _extant(path):


def _get_python_inc_posix(prefix, spec_prefix, plat_specific):
if IS_PYPY and sys.version_info < (3, 8):
return os.path.join(prefix, 'include')
return (
_get_python_inc_posix_python(plat_specific)
or _extant(_get_python_inc_from_config(plat_specific, spec_prefix))
Expand Down Expand Up @@ -246,14 +244,6 @@ def get_python_lib(
sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
"""

if IS_PYPY and sys.version_info < (3, 8):
# PyPy-specific schema
if prefix is None:
prefix = PREFIX
if standard_lib:
return os.path.join(prefix, "lib-python", sys.version_info.major)
return os.path.join(prefix, 'site-packages')

early_prefix = prefix

if prefix is None:
Expand Down
Loading