diff options
author | Matti Picus <matti.picus@gmail.com> | 2016-09-19 18:08:29 +0300 |
---|---|---|
committer | Matti Picus <matti.picus@gmail.com> | 2016-09-19 18:08:29 +0300 |
commit | 45111fd42d5bead37eae79f46abff53afebae5f3 (patch) | |
tree | 03d7dee0cb1e2bdc28d1145112a79f660b9141cb /lib-python | |
parent | Issue #2325/2361: __class__ assignment between two classes with the same (diff) | |
download | pypy-45111fd42d5bead37eae79f46abff53afebae5f3.tar.gz pypy-45111fd42d5bead37eae79f46abff53afebae5f3.tar.bz2 pypy-45111fd42d5bead37eae79f46abff53afebae5f3.zip |
revert 2b244ba62cf4, redo the distutils part to be cpython compliant (no SOABI)
Diffstat (limited to 'lib-python')
-rw-r--r-- | lib-python/2.7/distutils/sysconfig_pypy.py | 6 | ||||
-rw-r--r-- | lib-python/2.7/sysconfig.py | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib-python/2.7/distutils/sysconfig_pypy.py b/lib-python/2.7/distutils/sysconfig_pypy.py index 04419fed07..d1bf2a656b 100644 --- a/lib-python/2.7/distutils/sysconfig_pypy.py +++ b/lib-python/2.7/distutils/sysconfig_pypy.py @@ -63,8 +63,7 @@ def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" g = {} g['EXE'] = "" - g['SOABI'] = [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION] - g['SO'] = g['SOABI'][0] + g['SO'] = [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION][0] g['LIBDIR'] = os.path.join(sys.prefix, 'lib') g['CC'] = "gcc -pthread" # -pthread might not be valid on OS/X, check @@ -76,8 +75,7 @@ def _init_nt(): """Initialize the module as appropriate for NT""" g = {} g['EXE'] = ".exe" - g['SOABI'] = [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION] - g['SO'] = g['SOABI'][0] + g['SO'] = [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION][0] global _config_vars _config_vars = g diff --git a/lib-python/2.7/sysconfig.py b/lib-python/2.7/sysconfig.py index 4801cec215..539fedf6c6 100644 --- a/lib-python/2.7/sysconfig.py +++ b/lib-python/2.7/sysconfig.py @@ -526,7 +526,10 @@ def get_config_vars(*args): # PyPy: import imp - _CONFIG_VARS['SOABI'] = [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION] + for suffix, mode, type_ in imp.get_suffixes(): + if type_ == imp.C_EXTENSION: + _CONFIG_VARS['SOABI'] = suffix.split('.')[1] + break if args: vals = [] |