mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Handle dist info casing mismatch in worker (#273)
The metadata name may be uppercase, while the wheel and dist info names
are lowercase, or the metadata name and the dist info name are
lowercase, while the wheel name is uppercase. Either way, we just search
the wheel for the name. See `find_dist_info`:
2652caa3e3/crates/install-wheel-rs/src/wheel.rs (L1024-L1057)
I tested this with `wrangler dev` and `bio_embeddings[all]`
This commit is contained in:
parent
9488804024
commit
8a8b532330
1 changed files with 7 additions and 1 deletions
|
@ -73,8 +73,14 @@ async function readMetadata(
|
|||
version: string,
|
||||
) {
|
||||
const entries = await reader.getEntriesGenerator();
|
||||
const target = `${name}-${version}.dist-info/METADATA`.toLowerCase();
|
||||
|
||||
for await (const entry of entries) {
|
||||
if (entry.filename == `${name}-${version}.dist-info/METADATA`) {
|
||||
// The metadata name may be uppercase, while the wheel and dist info names are lowercase, or
|
||||
// the metadata name and the dist info name are lowercase, while the wheel name is uppercase.
|
||||
// Either way, we just search the wheel for the name. See `find_dist_info`:
|
||||
// https://github.com/astral-sh/puffin/blob/2652caa3e31282afc2f1e1ca581ac4f553af710d/crates/install-wheel-rs/src/wheel.rs#L1024-L1057
|
||||
if (entry.filename.toLowerCase() == target) {
|
||||
return await entry.getData!(new zip.TextWriter());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue