From 5a2e613768ff2607d70c5d03a8d9968225131454 Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Sun, 29 Nov 2020 15:38:23 +0200 Subject: [PATCH] Adapted for upcoming changes in PyPy's SOABI tag (#373) --- docs/news.rst | 4 ++++ src/wheel/bdist_wheel.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/news.rst b/docs/news.rst index 7e33bb83..8d71b316 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -7,6 +7,10 @@ Release Notes - Updated vendored ``packaging`` library to v20.7 - Switched to always using LF as line separator when generating ``WHEEL`` files (on Windows, CRLF was being used instead) +- The ABI tag is taken from the sysconfig SOABI value. On PyPy the SOABI value + is ``pypy37-pp73`` which is not compliant with PEP 3149, as it should have + both the API tag and the platform tag. This change future-proofs any change + in PyPy's SOABI tag to make sure only the ABI tag is used by wheel. **0.35.1 (2020-08-14)** diff --git a/src/wheel/bdist_wheel.py b/src/wheel/bdist_wheel.py index ebe654d7..9c9b0a88 100644 --- a/src/wheel/bdist_wheel.py +++ b/src/wheel/bdist_wheel.py @@ -97,6 +97,10 @@ def get_abi_tag(): abi = '%s%s%s%s%s' % (impl, tags.interpreter_version(), d, m, u) elif soabi and soabi.startswith('cpython-'): abi = 'cp' + soabi.split('-')[1] + elif soabi and soabi.startswith('pypy-'): + # we want something like pypy36-pp73 + abi = '-'.join(soabi.split('-')[:2]) + abi = abi.replace('.', '_').replace('-', '_') elif soabi: abi = soabi.replace('.', '_').replace('-', '_') else: