[pypy-svn] pypy default: add a new 'pypy' installation scheme for sysconfig.py: most notably, it fixes
antocuni
commits-noreply at bitbucket.org
Mon Feb 14 20:30:22 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r41924:a65b19d5c46f
Date: 2011-02-14 20:25 +0100
http://bitbucket.org/pypy/pypy/changeset/a65b19d5c46f/
Log: add a new 'pypy' installation scheme for sysconfig.py: most notably,
it fixes the place where to find the *.h files and fixes
test_get_config_h_filename()
diff --git a/lib-python/modified-2.7.0/sysconfig.py b/lib-python/modified-2.7.0/sysconfig.py
--- a/lib-python/modified-2.7.0/sysconfig.py
+++ b/lib-python/modified-2.7.0/sysconfig.py
@@ -26,6 +26,16 @@
'scripts': '{base}/bin',
'data' : '{base}',
},
+ 'pypy': {
+ 'stdlib': '{base}/lib-python',
+ 'platstdlib': '{base}/lib-python',
+ 'purelib': '{base}/lib-python',
+ 'platlib': '{base}/lib-python',
+ 'include': '{base}/include',
+ 'platinclude': '{base}/include',
+ 'scripts': '{base}/bin',
+ 'data' : '{base}',
+ },
'nt': {
'stdlib': '{base}/Lib',
'platstdlib': '{base}/Lib',
@@ -158,7 +168,9 @@
return res
def _get_default_scheme():
- if os.name == 'posix':
+ if '__pypy__' in sys.builtin_module_names:
+ return 'pypy'
+ elif os.name == 'posix':
# the default scheme for posix is posix_prefix
return 'posix_prefix'
return os.name
diff --git a/lib-python/modified-2.7.0/test/test_sysconfig.py b/lib-python/modified-2.7.0/test/test_sysconfig.py
--- a/lib-python/modified-2.7.0/test/test_sysconfig.py
+++ b/lib-python/modified-2.7.0/test/test_sysconfig.py
@@ -236,7 +236,7 @@
def test_get_scheme_names(self):
wanted = ('nt', 'nt_user', 'os2', 'os2_home', 'osx_framework_user',
- 'posix_home', 'posix_prefix', 'posix_user')
+ 'posix_home', 'posix_prefix', 'posix_user', 'pypy')
self.assertEquals(get_scheme_names(), wanted)
def test_symlink(self):
More information about the Pypy-commit
mailing list