From bd0c1f5d4ca0beba75d7a22bd57c6bbd3342ca79 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sun, 27 Dec 2020 12:06:28 -0800 Subject: [PATCH] Remove outdated PyPy workaround for site_packages location Upstream issue has been resolved and released on Python versions supported by pip: https://foss.heptapod.net/pypy/pypy/-/issues/2506 --- news/ae7bdce7-d6f3-4f30-9192-6a8e69027d6a.trivial.rst | 0 src/pip/_internal/locations.py | 7 ------- 2 files changed, 7 deletions(-) create mode 100644 news/ae7bdce7-d6f3-4f30-9192-6a8e69027d6a.trivial.rst diff --git a/news/ae7bdce7-d6f3-4f30-9192-6a8e69027d6a.trivial.rst b/news/ae7bdce7-d6f3-4f30-9192-6a8e69027d6a.trivial.rst new file mode 100644 index 000000000..e69de29bb diff --git a/src/pip/_internal/locations.py b/src/pip/_internal/locations.py index dc5d2e0b2..2a9032977 100644 --- a/src/pip/_internal/locations.py +++ b/src/pip/_internal/locations.py @@ -5,11 +5,9 @@ import os import os.path -import platform import site import sys import sysconfig -from distutils import sysconfig as distutils_sysconfig from distutils.command.install import SCHEME_KEYS # type: ignore from distutils.command.install import install as distutils_install_command @@ -60,11 +58,6 @@ def get_src_prefix(): site_packages = sysconfig.get_path("purelib") # type: Optional[str] -# This is because of a bug in PyPy's sysconfig module, see -# https://bitbucket.org/pypy/pypy/issues/2506/sysconfig-returns-incorrect-paths -# for more information. -if platform.python_implementation().lower() == "pypy": - site_packages = distutils_sysconfig.get_python_lib() try: # Use getusersitepackages if this is present, as it ensures that the # value is initialised properly.