Merge pull request #9379 from jdufresne/pypy-locations

Remove outdated PyPy workaround for site_packages location
This commit is contained in:
Pradyun Gedam 2020-12-28 07:35:06 +00:00 committed by GitHub
commit bad26fb5fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View File

@ -5,11 +5,9 @@
import os import os
import os.path import os.path
import platform
import site import site
import sys import sys
import sysconfig import sysconfig
from distutils import sysconfig as distutils_sysconfig
from distutils.command.install import SCHEME_KEYS # type: ignore from distutils.command.install import SCHEME_KEYS # type: ignore
from distutils.command.install import install as distutils_install_command 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] 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: try:
# Use getusersitepackages if this is present, as it ensures that the # Use getusersitepackages if this is present, as it ensures that the
# value is initialised properly. # value is initialised properly.