Symptom
uv build --wheel fails with Error: Invalid project metadata and Call to uv_build.build_wheel failed (exit status: 1) when a recursive license-files glob matches a binary file. The cause line is License file `src/zzz/_vendor/thing.bin` must be UTF-8 encoded.
Evidence what you'll see
- A project with
license-files = ["LICENSE.txt", "src/zzz/_vendor/**/LICENSE.txt"]and a one-bytething.binnext to a vendoredLICENSE.txtfails the wheel build. - The glob treated
thing.binas a license file. If that file is text, the build can include it as a license; if it is binary, the build fails on encoding. - Build backend
uv_build>=0.13.1,<0.14.
Why it happens
A recursive license glob did not require the file to match the full glob, so directory traversal also selected unrelated files. Pull request 22581 requires regular files (and symlinks to regular files) to match the full glob, while directory prefixes stay eligible for traversal.
Affected versions
uv_build>=0.13.1,<0.14 as the build backend. The linked issue does not name an operating system. The reproduction is a tiny package with a vendored binary next to LICENSE.txt.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
uv build --wheelsucceeds for that tree and does not printLicense file `src/zzz/_vendor/thing.bin` must be UTF-8 encoded.
If it still fails
- No published release tag contains pull request 22581. Tag
0.13.1was compared against mergee26c375d44cdand does not contain it. - Directory prefixes remain eligible for traversal so
LICENSE.txtunder a vendor folder is still found.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it