diff options
| author | mattip <matti.picus@gmail.com> | 2020-06-29 20:00:07 +0300 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-01 21:11:21 -0400 |
| commit | 12f74fb9280897a07199db0df76103487263136b (patch) | |
| tree | 65d10060935c4503659a07910cf03e6591892be6 | |
| parent | 2f1fae1bfceb88cf812a45c44cd18ce604b69c69 (diff) | |
| download | external_python_setuptools-12f74fb9280897a07199db0df76103487263136b.tar.gz external_python_setuptools-12f74fb9280897a07199db0df76103487263136b.tar.bz2 external_python_setuptools-12f74fb9280897a07199db0df76103487263136b.zip | |
do the minimum to fix sysconfig.py for PyPy, more will probably be needed
| -rw-r--r-- | distutils/sysconfig.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
