Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r63783:1e656277959b
Date: 2013-04-30 18:41 -0700
http://bitbucket.org/pypy/pypy/changeset/1e656277959b/
Log: apply the home/user distutils scheme fix from default (5b253d146851)
diff --git a/lib-python/3/distutils/command/install.py
b/lib-python/3/distutils/command/install.py
--- a/lib-python/3/distutils/command/install.py
+++ b/lib-python/3/distutils/command/install.py
@@ -489,7 +489,8 @@
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'):
+ if (hasattr(sys, 'pypy_version_info') and
+ not name.endswith(('_user', '_home'))):
name = 'pypy'
scheme = INSTALL_SCHEMES[name]
for key in SCHEME_KEYS:
diff --git a/lib-python/3/distutils/sysconfig_pypy.py
b/lib-python/3/distutils/sysconfig_pypy.py
--- a/lib-python/3/distutils/sysconfig_pypy.py
+++ b/lib-python/3/distutils/sysconfig_pypy.py
@@ -9,6 +9,7 @@
PREFIX = os.path.normpath(sys.prefix)
+EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
project_base = os.path.dirname(os.path.abspath(sys.executable))
python_build = False
@@ -94,6 +95,9 @@
else:
_config_vars = {}
+ _config_vars['prefix'] = PREFIX
+ _config_vars['exec_prefix'] = EXEC_PREFIX
+
if args:
vals = []
for name in args:
diff --git a/lib-python/3/distutils/tests/test_install.py
b/lib-python/3/distutils/tests/test_install.py
--- a/lib-python/3/distutils/tests/test_install.py
+++ b/lib-python/3/distutils/tests/test_install.py
@@ -6,7 +6,7 @@
import unittest
import site
-from test.support import captured_stdout, check_impl_detail, run_unittest
+from test.support import captured_stdout, run_unittest
from distutils import sysconfig
from distutils.command.install import install
@@ -58,15 +58,14 @@
expected = os.path.normpath(expected)
self.assertEqual(got, expected)
- if check_impl_detail():
- libdir = os.path.join(destination, "lib", "python")
- check_path(cmd.install_lib, libdir)
- check_path(cmd.install_platlib, libdir)
- check_path(cmd.install_purelib, libdir)
- check_path(cmd.install_headers,
- os.path.join(destination, "include", "python",
"foopkg"))
- check_path(cmd.install_scripts, os.path.join(destination, "bin"))
- check_path(cmd.install_data, destination)
+ libdir = os.path.join(destination, "lib", "python")
+ check_path(cmd.install_lib, libdir)
+ check_path(cmd.install_platlib, libdir)
+ check_path(cmd.install_purelib, libdir)
+ check_path(cmd.install_headers,
+ os.path.join(destination, "include", "python", "foopkg"))
+ check_path(cmd.install_scripts, os.path.join(destination, "bin"))
+ check_path(cmd.install_data, destination)
def test_user_site(self):
# test install with --user
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit