Avoid creating duplicate directory entries in built wheels (#12206)

## Summary

This is a bug in the build backend revealed via
https://github.com/astral-sh/uv/pull/12196. (By upgrading, `zip` now
errors on duplicate entries.)
This commit is contained in:
Charlie Marsh 2025-03-16 16:48:35 -07:00 committed by GitHub
parent b689e34418
commit 9785266e29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -506,6 +506,14 @@ fn wheel_subdir_from_globs(
root: src.to_path_buf(),
err,
})?;
// Skip the root path, which is already included as `target` prior to the loop.
// (If `entry.path() == src`, then `relative` is empty, and `relative_licenses` is
// `target`.)
if entry.path() == src {
continue;
}
// TODO(konsti): This should be prettier.
let relative = entry
.path()