Skip to content

Commit

Permalink
Initial workspace support
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed May 22, 2024
1 parent fe28b2c commit 1281558
Show file tree
Hide file tree
Showing 33 changed files with 883 additions and 212 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/pep508-rs/src/verbatim_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,16 @@ impl VerbatimUrl {
#[cfg(feature = "non-pep508-extensions")] // PEP 508 arguably only allows absolute file URLs.
pub fn parse_path(
path: impl AsRef<Path>,
working_dir: impl AsRef<Path>,
base_dir: impl AsRef<Path>,
) -> Result<Self, VerbatimUrlError> {
debug_assert!(base_dir.as_ref().is_absolute(), "base dir must be absolute");
let path = path.as_ref();

// Convert the path to an absolute path, if necessary.
let path = if path.is_absolute() {
path.to_path_buf()
} else {
working_dir.as_ref().join(path)
base_dir.as_ref().join(path)
};

// Normalize the path.
Expand Down
3 changes: 2 additions & 1 deletion crates/uv-requirements/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ fs-err = { workspace = true, features = ["tokio"] }
futures = { workspace = true }
glob = { workspace = true }
indexmap = { workspace = true }
itertools = { workspace = true }
path-absolutize = { workspace = true }
rustc-hash = { workspace = true }
same-file = { workspace = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true }
thiserror = { workspace = true }
Expand All @@ -52,6 +52,7 @@ schemars = ["dep:schemars"]
indoc = "2.0.5"
insta = { version = "1.38.0", features = ["filters", "redactions", "json"] }
regex = { workspace = true }
tokio = { workspace = true }

[lints]
workspace = true
Loading

0 comments on commit 1281558

Please sign in to comment.