[pypy-commit] pypy py3k: reapply lost sysconfig changes from old py3k, add a skip
pjenvey
pypy.commits at gmail.com
Sun May 22 20:04:30 EDT 2016
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r84610:7122d29b9ca9
Date: 2016-05-22 17:03 -0700
http://bitbucket.org/pypy/pypy/changeset/7122d29b9ca9/
Log: reapply lost sysconfig changes from old py3k, add a skip
diff --git a/lib-python/3/sysconfig.py b/lib-python/3/sysconfig.py
--- a/lib-python/3/sysconfig.py
+++ b/lib-python/3/sysconfig.py
@@ -42,6 +42,16 @@
'scripts': '{base}/bin',
'data': '{base}',
},
+ 'pypy': {
+ 'stdlib': '{installed_base}/lib-python',
+ 'platstdlib': '{base}/lib-python',
+ 'purelib': '{base}/lib-python',
+ 'platlib': '{base}/lib-python',
+ 'include': '{installed_base}/include',
+ 'platinclude': '{installed_base}/include',
+ 'scripts': '{base}/bin',
+ 'data' : '{base}',
+ },
'nt': {
'stdlib': '{installed_base}/Lib',
'platstdlib': '{base}/Lib',
@@ -198,7 +208,9 @@
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/3/test/test_sysconfig.py b/lib-python/3/test/test_sysconfig.py
--- a/lib-python/3/test/test_sysconfig.py
+++ b/lib-python/3/test/test_sysconfig.py
@@ -239,7 +239,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.assertEqual(get_scheme_names(), wanted)
@skip_unless_symlink
@@ -345,6 +345,7 @@
self.assertEqual(status, 0)
self.assertEqual(my_platform, test_platform)
+ @impl_detail("Test is not PyPy compatible", pypy=False)
def test_srcdir(self):
# See Issues #15322, #15364.
srcdir = sysconfig.get_config_var('srcdir')
@@ -379,7 +380,7 @@
class MakefileTests(unittest.TestCase):
- @impl_detail("PyPy lacks sysconfig.get_makefile_filename", pypy=False)
+ @impl_detail("Test is not PyPy compatible", pypy=False)
@unittest.skipIf(sys.platform.startswith('win'),
'Test is not Windows compatible')
def test_get_makefile_filename(self):
More information about the pypy-commit
mailing list