mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-14 01:32:24 +00:00
Loosen .dist-info validation to accept arbitrary versions (#2441)
## Summary It turns out that pip does _not_ validate the normalization of the version specifier in the `.dist-info` directory. In particular, it seems that some tools replace the `+` in a local version segment with a `_`. Closes https://github.com/astral-sh/uv/issues/2424.
This commit is contained in:
parent
b5d9014918
commit
492ffbf997
3 changed files with 63 additions and 33 deletions
|
|
@ -137,6 +137,8 @@ pub fn install_wheel(
|
|||
/// Find the `dist-info` directory in an unzipped wheel.
|
||||
///
|
||||
/// See: <https://github.com/PyO3/python-pkginfo-rs>
|
||||
///
|
||||
/// See: <https://github.com/pypa/pip/blob/36823099a9cdd83261fdbc8c1d2a24fa2eea72ca/src/pip/_internal/utils/wheel.py#L38>
|
||||
fn find_dist_info(path: impl AsRef<Path>) -> Result<String, Error> {
|
||||
// Iterate over `path` to find the `.dist-info` directory. It should be at the top-level.
|
||||
let Some(dist_info) = fs::read_dir(path.as_ref())?.find_map(|entry| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue