uv/crates/uv-virtualenv/src
Charlie Marsh 00fc44012c
Use relative paths for user display (#2559)
## Summary

This PR changes our user-facing representation for paths to use relative
paths, when the path is within the current working directory. This
mirrors what we do in Ruff. (If the path is _outside_ the current
working directory, we print an absolute path.)

Before:

```shell
❯ uv venv .venv2
Using Python 3.12.2 interpreter at: /Users/crmarsh/workspace/uv/.venv/bin/python3
Creating virtualenv at: .venv2
Activate with: source .venv2/bin/activate
```

After:

```shell
❯ cargo run venv .venv2
    Finished dev [unoptimized + debuginfo] target(s) in 0.15s
     Running `target/debug/uv venv .venv2`
Using Python 3.12.2 interpreter at: .venv/bin/python3
Creating virtualenv at: .venv2
Activate with: source .venv2/bin/activate
```

Note that we still want to use the existing `.simplified_display()`
anywhere that the path is being simplified, but _still_ intended for
machine consumption (e.g., when passing to `.current_dir()`).
2024-03-20 09:52:50 -04:00
..
activator Rename gourgeist to uv-virtualenv (#2118) 2024-03-01 14:02:40 -05:00
_virtualenv.py Rename gourgeist to uv-virtualenv (#2118) 2024-03-01 14:02:40 -05:00
bare.rs Use relative paths for user display (#2559) 2024-03-20 09:52:50 -04:00
lib.rs Move architecture and operating system probing to Python (#2381) 2024-03-13 11:51:14 +00:00
main.rs Move architecture and operating system probing to Python (#2381) 2024-03-13 11:51:14 +00:00