mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Support relative path wheels (#5969)
Surprisingly, this is a lockfile schema change: We can't store relative paths in urls, so we have to store a `filename` entry instead of the whole url. Fixes #4355
This commit is contained in:
parent
dd32087842
commit
fcbee9ce25
10 changed files with 221 additions and 50 deletions
|
@ -330,13 +330,14 @@ impl<'a> Planner<'a> {
|
|||
let wheel = PathBuiltDist {
|
||||
filename,
|
||||
url: url.clone(),
|
||||
path,
|
||||
install_path: install_path.clone(),
|
||||
lock_path: lock_path.clone(),
|
||||
};
|
||||
|
||||
if !wheel.filename.is_compatible(tags) {
|
||||
bail!(
|
||||
"A path dependency is incompatible with the current platform: {}",
|
||||
wheel.path.user_display()
|
||||
wheel.lock_path.user_display()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -357,7 +358,7 @@ impl<'a> Planner<'a> {
|
|||
.entry(format!("{}.rev", wheel.filename.stem()));
|
||||
|
||||
if let Some(pointer) = LocalArchivePointer::read_from(&cache_entry)? {
|
||||
let timestamp = ArchiveTimestamp::from_file(&wheel.path)?;
|
||||
let timestamp = ArchiveTimestamp::from_file(&wheel.install_path)?;
|
||||
if pointer.is_up_to_date(timestamp) {
|
||||
let archive = pointer.into_archive();
|
||||
if archive.satisfies(hasher.get(&wheel)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue