[pypy-svn] pypy default: merge some of the changes from modified-2.5.2/distutils; this makes setup.py install working again
antocuni
commits-noreply at bitbucket.org
Fri Jan 21 16:04:50 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r41143:7066bafb6443
Date: 2011-01-21 16:02 +0100
http://bitbucket.org/pypy/pypy/changeset/7066bafb6443/
Log: merge some of the changes from modified-2.5.2/distutils; this makes
setup.py install working again
diff --git a/lib-python/modified-2.7.0/distutils/command/install.py b/lib-python/modified-2.7.0/distutils/command/install.py
--- a/lib-python/modified-2.7.0/distutils/command/install.py
+++ b/lib-python/modified-2.7.0/distutils/command/install.py
@@ -20,6 +20,7 @@
from distutils.errors import DistutilsOptionError
from site import USER_BASE
from site import USER_SITE
+from test.test_support import check_impl_detail
if sys.version < "2.2":
@@ -83,6 +84,13 @@
'scripts': '$userbase/bin',
'data' : '$userbase',
},
+ 'pypy': {
+ 'purelib': '$base/site-packages',
+ 'platlib': '$base/site-packages',
+ 'headers': '$base/include',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
}
# The keys to an installation scheme; if any new types of files are to be
@@ -467,6 +475,8 @@
def select_scheme (self, name):
# it's the caller's problem if they supply a bad name!
+ if hasattr(sys, 'pypy_version_info'):
+ name = 'pypy'
scheme = INSTALL_SCHEMES[name]
for key in SCHEME_KEYS:
attrname = 'install_' + key
diff --git a/lib-python/modified-2.7.0/distutils/tests/test_install.py b/lib-python/modified-2.7.0/distutils/tests/test_install.py
--- a/lib-python/modified-2.7.0/distutils/tests/test_install.py
+++ b/lib-python/modified-2.7.0/distutils/tests/test_install.py
@@ -38,14 +38,15 @@
expected = os.path.normpath(expected)
self.assertEqual(got, expected)
- 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)
+ 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)
def test_suite():
More information about the Pypy-commit
mailing list