Fix pypy soabi tests
Xenial PyPy adds multiarch to the compiled c library, so if PyPy reports multiarch we add it to the soabi string. If the installed PyPy is not configured for multiarch, the multiarch config variable will not exist and `arch` will be None, in which case we should only update the string if multiarch exists. Change-Id: Idcd3af4878d5b66c6770f96e7235a7d2f848df81
This commit is contained in:
parent
9858f5863f
commit
d529e2b2a2
|
@ -738,8 +738,11 @@ def get_soabi():
|
|||
soabi = None
|
||||
try:
|
||||
soabi = sysconfig.get_config_var('SOABI')
|
||||
arch = sysconfig.get_config_var('MULTIARCH')
|
||||
except IOError:
|
||||
pass
|
||||
if soabi and arch and 'pypy' in sysconfig.get_scheme_names():
|
||||
soabi = '%s-%s' % (soabi, arch)
|
||||
if soabi is None and 'pypy' in sysconfig.get_scheme_names():
|
||||
# NOTE(sigmavirus24): PyPy only added support for the SOABI config var
|
||||
# to sysconfig in 2015. That was well after 2.2.1 was published in the
|
||||
|
|
Loading…
Reference in New Issue