Commit 12f74fb9 authored by mattip's avatar mattip Committed by Jason R. Coombs

do the minimum to fix sysconfig.py for PyPy, more will probably be needed

parent 2f1fae1b
...@@ -16,6 +16,8 @@ import sys ...@@ -16,6 +16,8 @@ import sys
from .errors import DistutilsPlatformError 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. # These are needed in a couple of spots, so just compute them once.
PREFIX = os.path.normpath(sys.prefix) PREFIX = os.path.normpath(sys.prefix)
EXEC_PREFIX = os.path.normpath(sys.exec_prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
...@@ -97,7 +99,9 @@ def get_python_inc(plat_specific=0, prefix=None): ...@@ -97,7 +99,9 @@ def get_python_inc(plat_specific=0, prefix=None):
""" """
if prefix is None: if prefix is None:
prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX 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: if python_build:
# Assume the executable is in the build directory. The # Assume the executable is in the build directory. The
# pyconfig.h file should be in the same directory. Since # pyconfig.h file should be in the same directory. Since
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment