Skip to content

Commit

Permalink
Update tests following ABI computation change.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsajip committed Jul 9, 2022
1 parent 1196d31 commit dde0c83
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tests/test_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from distlib.scripts import ScriptMaker
from distlib.util import get_executable
from distlib.wheel import (Wheel, PYVER, IMPVER, ARCH, ABI, COMPATIBLE_TAGS,
is_compatible, _get_glibc_version)
IMP_PREFIX, is_compatible, _get_glibc_version)

try:
with open(os.devnull, 'wb') as junk:
Expand Down Expand Up @@ -676,12 +676,17 @@ def test_abi(self):
parts.append('d')
# Starting with 3.8, the SOABI doesn't append m when WITH_PYMALLOC is
# defined (see bpo-36707)
if (sys.version_info[:2] < (3, 8) and
sysconfig.get_config_var('WITH_PYMALLOC')):
parts.append('m')
if sysconfig.get_config_var('Py_UNICODE_SIZE') == 4:
parts.append('u')
if sys.version_info[:2] < (3, 5):
vi = sys.version_info[:2]
if IMP_PREFIX == 'cp':
if vi < (3, 8):
wpm = sysconfig.get_config_var('WITH_PYMALLOC')
if wpm or wpm is None:
parts.append('m')
if vi < (3, 3):
us = sysconfig.get_config_var('Py_UNICODE_SIZE')
if us == 4 or (us is None and sys.maxunicode == 0x10FFFF):
parts.append('u')
if vi < (3, 5):
abi = ABI
else:
abi = ABI.split('-')[0]
Expand Down

0 comments on commit dde0c83

Please sign in to comment.