astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
27.96k stars 803 forks source link

Equivalent command to `twine check` #8641

Open lengau opened 1 month ago

lengau commented 1 month ago

To go along with uv publish, it would be great if we could check our wheel files like twine check.

Most important would be errors like:

Checking rockcraft/dist/rockcraft-1.6.0.post2+gfc6e711.d20241021-py3-none-any.whl: FAILED
ERROR    `long_description` has syntax errors in markup and would not be rendered on PyPI.
line 31: Warning: Cannot scale image!
Could not get size from "https://snapcraft.io/rockcraft/badge.svg":
Reading external files disabled.

(Personally this is very low priority for my team as running uvx twine check isn't exactly a slow task.)

konstin commented 3 weeks ago

I'm not opposed to including these checks in uv, but ideally, these checks would already be performed by the build backed: We should error when building the wheel, ideally locally, instead of only failing during a publish run (on CI).