Help understanding tagging system for packaging: py3-abi3-\* vs cp3-abi3-\*

I’m building a Python package (which provides a CFFI-based clib), and I want to support as many platforms as possible with binary wheels, because compiling can be hellish, while keeping my total wheel count down. (But I don’t want to build “fat wheels” since the package I’m maintaining already has pretty hefty filesizes — also, it looks like a fat wheel is forced to choose between having an unreasonably long filename, or having an incorrect tag.)

To this end, I’ve been looking at “abi3”.

I see the Python Packaging User Guide has a page that provides some advice on this.

I want to start out supporting at least these platforms:

  • CPython 3.X on Windows 64-bit
  • CPython 3.X on Windows 32-bit
  • PyPy 3.X (7.3.X) on Windows 64-bit
  • CPython 3.X on x86_64 Ubuntu 20.04 and newer
  • CPython 3.X on i686 Ubuntu 20.04 and newer
  • PyPy 3.X (7.3.X) on x86_64 Ubuntu 20.04 and newer

(Mac OS is pending some toolchain issues due to upstream using GNU compiler features.)

It’s my understanding that this corresponds to the following tags, which will each require 1 wheel to address (and this set cannot be addressed in fewer wheels, without going for fat wheels):

  • cp3-abi3-win_amd64
  • cp3-abi3-win32
  • pp3-pypy73-win_amd64
  • cp3-abi3-manylinux2014_x86_64
  • cp3-abi3-manylinux2014_i686
  • pp3-pypy73-manylinux2014_x86_64

But I want to check my understanding.

Namely: I see many wheels by people much more experienced than me, which have been published as py3-abi3-{platform.tag}; is that “technically” a wrong tag? I can’t tell whether the ABI tag abi3 is supposed to be CPython-specific, since PyPy doesn’t seem to want to accept it; but it’s usually tagged with the non-CPython-specific py3 Python tag.

Slight correction: it looks like PyPy provides no such equivalent to the “stable ABI”.

So there is no such thing as py3-pypy73-{platform} at this time; you must use (e.g.) py310-pypy73-{platform}, and more if you want to target multiple Python versions in PyPy.

Nope, that’s just wrong. I was misreading it.

abi3 is, at least for now, only ever associated with cp3\d.