Skip to content

maturin generated WHEEL Tag metadata can include compressed tags. #2761

Closed

Description

@jsirois

Bug Description

As discovered in pex-tool/pex#2926, maturin-built wheels with compressed tag sets contain WHEEL Tag metadata that also has a compressed tag. Per the spec the Tag entries should be expanded and not compressed. See items 7 and 11 here for the text and example: https://packaging.python.org/en/latest/specifications/binary-distribution-format/#file-contents

Your maturin version (maturin --version)

1.7.5, 1.9.4, main

Your Python version (python -V)

N/A

Your pip version (pip -V)

N/A

What bindings you're using

None

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

Locally you can see this with a test run like so:

:; cargo test
:; find test-crates/venvs/ -name WHEEL | xargs grep "Tag: " | grep "\.many"
test-crates/venvs/develop-pyo3-ffi-pure-uv-cpython/lib/python3.14/site-packages/uv-0.8.24.dist-info/WHEEL:Tag: py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64
test-crates/venvs/develop-hello-world-uv-cpython/lib/python3.14/site-packages/uv-0.8.24.dist-info/WHEEL:Tag: py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64

In both of those cases the Tag metadata should be expanded like so instead of compressed:

Tag: py3-none-manylinux_2_17_x86_64
Tag: py3-none-manylinux2014_x86_64

In the wild you can see this too as discovered in pex-tool/pex#2926:

:; pip wheel -w /tmp/wheels tokenizers==0.21.0 hf-xet==1.1.10 --no-deps
Collecting tokenizers==0.21.0
  File was already downloaded /tmp/wheels/tokenizers-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Collecting hf-xet==1.1.10
  File was already downloaded /tmp/wheels/hf_xet-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

:; unzip -qc /tmp/wheels/tokenizers-0.21.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl tokenizers-0.21.0.dist-info/WHEEL
Wheel-Version: 1.0
Generator: maturin (1.7.5)
Root-Is-Purelib: false
Tag: cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64

:; unzip -qc /tmp/wheels/hf_xet-1.1.10-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl hf_xet-1.1.10.dist-info/WHEEL
Wheel-Version: 1.0
Generator: maturin (1.9.4)
Root-Is-Purelib: false
Tag: cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64

Activity

  1. jsirois commented on Oct 7, 2025

    @jsirois
    ContributorAuthor

    N.B.: I have a fix PR forthcoming.

  2. added a commit that references this issue on Oct 7, 2025
    ea3741e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions