Version is defined as <public version identifier>[+<local version label>] with public version [N!]N(.N)*[{a|b|rc}N][.postN][.devN] and optional local version [a-zA-Z0-9.]+. See #92 for a local version label discussion.
python tag and abi tag reflect the Python version and ABI version of a platlib wheel (wheel with platform-specific binary extensions). They are typically cp312-cp312 for a CPython 3.12 wheel or cp312-abi3 for a wheel with stable ABI that is compatible with Python >= 3.12, <4.0.
The platform tag contains information similar to target triplet, e.g. linux-x86-64 for Linux on AMD64 or manylinux2014_aarch64 for Linux on ARM64 on CentOS 6 or newer (manylinux2014 standard with glibc 2.17).
Tools like pip use packaging.tags.sys_tags() to generated an ordered list of supported tags. The tool dynamically creates tags based on current implementation (CPython, PyPy), version, sysconfig.get_platform(), and glibc/musllibc version. On my Fedora 39 with glibc 2.38, the platform tags are:
>>> [str(t) for t in packaging.tags.sys_tags()]
['cp312-cp312-manylinux_2_38_x86_64', 'cp312-cp312-manylinux_2_37_x86_64', 'cp312-cp312-manylinux_2_36_x86_64', 'cp312-cp312-manylinux_2_35_x86_64',
...
'py34-none-any', 'py33-none-any', 'py32-none-any', 'py31-none-any', 'py30-none-any']
I have an idea how we can dynamically extend the platform tags with custom tags. At first this will require a bit of monkey patching with a meta import hook, dynamic loader, and a .pth file. Later we could ask upstream to include a API (e.g. entry point hook) to extend the tags.
get current distro and version to define distro ABI (e.g. fc39, el9). I added platform.freedesktop_os_release several years ago
platform and CPU extensions for machine and ISA version (e.g. x86_64_v3 for -march=x86-64-v3
GPU hardware and support library version from a config file in $VIRTUAL_ENV, e.g. cuda12_1, rocm6_0
Example tag: linux_x86_64_v3_fc39_rocm6_0
Example wheel: example-1.2.3+fc39.rocm6.0-cp312-cp312-linux_x86_64_v3_fc39_rocm6_0.whl. The distro ABI and GPU extension is included twice, so it also shows up in pip list and packaging metadata.
The filename of wheels are standardized and contain the following information:
Version is defined as
<public version identifier>[+<local version label>]
with public version[N!]N(.N)*[{a|b|rc}N][.postN][.devN]
and optional local version[a-zA-Z0-9.]+
. See #92 for a local version label discussion.python tag
andabi tag
reflect the Python version and ABI version of a platlib wheel (wheel with platform-specific binary extensions). They are typicallycp312-cp312
for a CPython 3.12 wheel orcp312-abi3
for a wheel with stable ABI that is compatible with Python >= 3.12, <4.0.The
platform tag
contains information similar to target triplet, e.g.linux-x86-64
for Linux on AMD64 ormanylinux2014_aarch64
for Linux on ARM64 on CentOS 6 or newer (manylinux2014 standard with glibc 2.17).Tools like pip use packaging.tags.sys_tags() to generated an ordered list of supported tags. The tool dynamically creates tags based on current implementation (CPython, PyPy), version,
sysconfig.get_platform()
, and glibc/musllibc version. On my Fedora 39 with glibc 2.38, the platform tags are:And
sys_tags()
returns > 1,000 tag variants:I have an idea how we can dynamically extend the platform tags with custom tags. At first this will require a bit of monkey patching with a meta import hook, dynamic loader, and a
.pth
file. Later we could ask upstream to include a API (e.g. entry point hook) to extend the tags.fc39
,el9
). I added platform.freedesktop_os_release several years ago-march=x86-64-v3
$VIRTUAL_ENV
, e.g. cuda12_1, rocm6_0Example tag:
linux_x86_64_v3_fc39_rocm6_0
Example wheel:example-1.2.3+fc39.rocm6.0-cp312-cp312-linux_x86_64_v3_fc39_rocm6_0.whl
. The distro ABI and GPU extension is included twice, so it also shows up inpip list
and packaging metadata.