aboutsummaryrefslogtreecommitdiffstats
path: root/distutils/command/install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-07-02 05:11:12 -0400
committerGitHub <noreply@github.com>2020-07-02 05:11:12 -0400
commit76d53a85676ff2ac0947a409e9f49bb06b191636 (patch)
treea626c91548ef77ba0253e141f57bab374d201586 /distutils/command/install.py
parent4f1d15983b650c20dc6de48f6675c9ce84c0c3a9 (diff)
parentc3a052aefbba0d5fda10790e676223c0dc12f0ed (diff)
downloadexternal_python_setuptools-76d53a85676ff2ac0947a409e9f49bb06b191636.tar.gz
external_python_setuptools-76d53a85676ff2ac0947a409e9f49bb06b191636.tar.bz2
external_python_setuptools-76d53a85676ff2ac0947a409e9f49bb06b191636.zip
Merge pull request #1 from pypa/feature/integrate-pypy
Add support for PyPy
Diffstat (limited to 'distutils/command/install.py')
-rw-r--r--distutils/command/install.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/distutils/command/install.py b/distutils/command/install.py
index 21f8c27c..13feeb89 100644
--- a/distutils/command/install.py
+++ b/distutils/command/install.py
@@ -43,6 +43,20 @@ INSTALL_SCHEMES = {
'data' : '$base',
},
'nt': WINDOWS_SCHEME,
+ 'pypy': {
+ 'purelib': '$base/site-packages',
+ 'platlib': '$base/site-packages',
+ 'headers': '$base/include/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
+ 'pypy_nt': {
+ 'purelib': '$base/site-packages',
+ 'platlib': '$base/site-packages',
+ 'headers': '$base/include/$dist_name',
+ 'scripts': '$base/Scripts',
+ 'data' : '$base',
+ },
}
# user site schemes
@@ -455,6 +469,12 @@ class install(Command):
def select_scheme(self, name):
"""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
+ not name.endswith(('_user', '_home'))):
+ if os.name == 'nt':
+ name = 'pypy_nt'
+ else:
+ name = 'pypy'
scheme = INSTALL_SCHEMES[name]
for key in SCHEME_KEYS:
attrname = 'install_' + key