mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Accept relative file paths in CLI requirements (#1182)
## Summary See: https://github.com/astral-sh/puffin/issues/1181. ## Test Plan ``` ❯ cargo run -- pip install packse@../../zanieb/packse Finished dev [unoptimized + debuginfo] target(s) in 0.15s Running `target/debug/puffin pip install 'packse@../../zanieb/packse'` error: Distribution not found at: file:///Users/crmarsh/zanieb/packse ```
This commit is contained in:
parent
61a3060383
commit
bd934207e4
3 changed files with 15 additions and 18 deletions
|
@ -402,8 +402,8 @@ impl FromStr for Requirement {
|
|||
|
||||
impl Requirement {
|
||||
/// Parse a [Dependency Specifier](https://packaging.python.org/en/latest/specifications/dependency-specifiers/)
|
||||
pub fn parse(input: &str, working_dir: Option<&Path>) -> Result<Self, Pep508Error> {
|
||||
parse(&mut Cursor::new(input), working_dir)
|
||||
pub fn parse(input: &str, working_dir: impl AsRef<Path>) -> Result<Self, Pep508Error> {
|
||||
parse(&mut Cursor::new(input), Some(working_dir.as_ref()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue