mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-28 10:50:29 +00:00
Only use relative paths in lockfile (#6490)
For users who were using absolute paths in the `pyproject.toml` previously, this is a behavior change: We now convert all absolute paths in `path` entries to relative paths. Since i assume that no-one relies on absolute path in their lockfiles - they are intended to be portable - I'm tagging this as a bugfix. Closes https://github.com/astral-sh/uv/pull/6438 Fixes https://github.com/astral-sh/uv/issues/6371
This commit is contained in:
parent
611a9003c9
commit
f7835243c5
30 changed files with 329 additions and 383 deletions
|
|
@ -332,13 +332,13 @@ impl Source {
|
|||
|
||||
let source = match source {
|
||||
RequirementSource::Registry { .. } => return Ok(None),
|
||||
RequirementSource::Path { lock_path, .. } => Source::Path {
|
||||
RequirementSource::Path { install_path, .. } => Source::Path {
|
||||
editable,
|
||||
path: lock_path.to_string_lossy().into_owned(),
|
||||
path: install_path.to_string_lossy().into_owned(),
|
||||
},
|
||||
RequirementSource::Directory { lock_path, .. } => Source::Path {
|
||||
RequirementSource::Directory { install_path, .. } => Source::Path {
|
||||
editable,
|
||||
path: lock_path.to_string_lossy().into_owned(),
|
||||
path: install_path.to_string_lossy().into_owned(),
|
||||
},
|
||||
RequirementSource::Url {
|
||||
subdirectory, url, ..
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue