From 12f74fb9280897a07199db0df76103487263136b Mon Sep 17 00:00:00 2001 From: mattip Date: Mon, 29 Jun 2020 20:00:07 +0300 Subject: do the minimum to fix sysconfig.py for PyPy, more will probably be needed --- distutils/sysconfig.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'distutils') diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py index 79391e86..255243ad 100644 --- a/distutils/sysconfig.py +++ b/distutils/sysconfig.py @@ -16,6 +16,8 @@ import sys from .errors import DistutilsPlatformError +IS_PYPY = '__pypy__' in sys.builtin_module_names + # These are needed in a couple of spots, so just compute them once. PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) @@ -97,7 +99,9 @@ def get_python_inc(plat_specific=0, prefix=None): """ if prefix is None: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX - if os.name == "posix": + if IS_PYPY: + return os.path.join(prefix, 'include') + elif os.name == "posix": if python_build: # Assume the executable is in the build directory. The # pyconfig.h file should be in the same directory. Since -- cgit v1.2.3