mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-25 17:38:21 +00:00
Avoid reading stale .egg-info from mutable sources (#6714)
## Summary In theory this problem already existed for `PKG-INFO`, but `egg-info` would be more common, I think, since it's built in the source tree. Closes https://github.com/astral-sh/uv/issues/6712.
This commit is contained in:
parent
a999303d2f
commit
14074f8775
3 changed files with 88 additions and 0 deletions
|
|
@ -1529,6 +1529,12 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
|||
Err(err) => return Err(err),
|
||||
}
|
||||
|
||||
// If the source distribution is a source tree, avoid reading `PKG-INFO` or `egg-info`,
|
||||
// since they could be out-of-date.
|
||||
if source.is_source_tree() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
// Attempt to read static metadata from the `PKG-INFO` file.
|
||||
match read_pkg_info(source_root, subdirectory).await {
|
||||
Ok(metadata) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue