Commits

Philip Jenvey committed 1e65627

apply the home/user distutils scheme fix from default (5b253d146851)

  • Participants
  • Parent commits 6a38c70
  • Branches py3k

Comments (0)

Files changed (3)

File lib-python/3/distutils/command/install.py

     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:

File lib-python/3/distutils/sysconfig_pypy.py

 
 
 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
 
         else:
             _config_vars = {}
 
+        _config_vars['prefix'] = PREFIX
+        _config_vars['exec_prefix'] = EXEC_PREFIX
+
     if args:
         vals = []
         for name in args:

File lib-python/3/distutils/tests/test_install.py

 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
             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