diff options
| author | Matti Picus <matti.picus@gmail.com> | 2021-09-10 17:57:04 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-10 15:57:04 +0100 |
| commit | 7e16c3560e1f637f5e1638e03d02db829aeb7296 (patch) | |
| tree | a6b0ef62ef53d517751f6f1aecd2db67ea9839ea | |
| parent | aede9e035dde34b0f2a6e9fe3a3bd87d4b9d7370 (diff) | |
| download | python-setuptools-git-7e16c3560e1f637f5e1638e03d02db829aeb7296.tar.gz | |
adopt more standard schema for pypy3.8 (#51)
| -rw-r--r-- | distutils/command/install.py | 1 | ||||
| -rw-r--r-- | distutils/sysconfig.py | 15 |
2 files changed, 10 insertions, 6 deletions
diff --git a/distutils/command/install.py b/distutils/command/install.py index 400fb45d..866e2d59 100644 --- a/distutils/command/install.py +++ b/distutils/command/install.py @@ -470,6 +470,7 @@ class install(Command): """Sets the install directories by applying the install schemes.""" # it's the caller's problem if they supply a bad name! if (hasattr(sys, 'pypy_version_info') and + sys.version_info < (3, 8) and not name.endswith(('_user', '_home'))): if os.name == 'nt': name = 'pypy_nt' diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py index 879b6981..efb7b3d4 100644 --- a/distutils/sysconfig.py +++ b/distutils/sysconfig.py @@ -99,9 +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 IS_PYPY: - return os.path.join(prefix, 'include') - elif os.name == "posix": + if os.name == "posix": + if IS_PYPY and sys.version_info < (3, 8): + return os.path.join(prefix, 'include') if python_build: # Assume the executable is in the build directory. The # pyconfig.h file should be in the same directory. Since @@ -113,7 +113,8 @@ def get_python_inc(plat_specific=0, prefix=None): else: incdir = os.path.join(get_config_var('srcdir'), 'Include') return os.path.normpath(incdir) - python_dir = 'python' + get_python_version() + build_flags + implementation = 'pypy' if IS_PYPY else 'python' + python_dir = implementation + get_python_version() + build_flags return os.path.join(prefix, "include", python_dir) elif os.name == "nt": if python_build: @@ -142,7 +143,8 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ - if IS_PYPY: + + if IS_PYPY and sys.version_info < (3, 8): # PyPy-specific schema if prefix is None: prefix = PREFIX @@ -164,8 +166,9 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): else: # Pure Python libdir = "lib" + implementation = 'pypy' if IS_PYPY else 'python' libpython = os.path.join(prefix, libdir, - "python" + get_python_version()) + implementation + get_python_version()) if standard_lib: return libpython else: |
