```
(uv) ~/workspace/uv> cargo run venv
Using Python 3.12.0 interpreter at: /Users/crmarsh/workspace/uv/.venv/bin/python3
Creating virtualenv at: .venv
Activate with: overlay use .venv/bin/activate.nu
```
On Bash:
```
❯ cargo run venv "foo bar"
Using Python 3.12.0 interpreter at: /Users/crmarsh/.local/share/rtx/installs/python/3.12.0/bin/python3
Creating virtualenv at: foo bar
Activate with: source 'foo bar/bin/activate'
```
9e41f73...
by
Charlie Marsh <email address hidden>
Respect non-`sysconfig`-based system Pythons (#2193)
## Summary
`pip` uses `sysconfig` for Python 3.10 and later by default; however, it
falls back to `distutils` for earlier Python versions, and distros can
actually tell `pip` to continue falling back to `distutils` via the
`_PIP_USE_SYSCONFIG` variable.
By _always_ using `sysconfig`, we're doing the wrong then when
installing into some system Pythons, e.g., on Debian prior to Python
3.10.
This PR modifies our logic to mirror `pip` exactly, which is what's been
recommended to me as the right thing to do.
0f6fc11...
by
Charlie Marsh <email address hidden>
Query interpreter to determine correct `virtualenv` paths (#2188)
## Summary
This PR migrates our virtualenv creation from a setup that assumes prior
knowledge of the correct paths, to a technique borrowed from
`virtualenv` whereby we use `sysconfig` and `distutils` to determine the
paths. The general trick is to grab the expected paths with `sysconfig`,
then make them all relative, then make them absolute for a given
directory.
Closes #2095.
Closes #2153.
a8ac7b1...
by
Charlie Marsh <email address hidden>
01ebaef...
by
Charlie Marsh <email address hidden>
Avoid Windows Store shims in `--python python3`-like invocations (#2212)
## Summary
We have logic in `python_query.rs` to filter out Windows Store shims
when you use invocations like `-p 3.10`, but not `--python python3`,
which is uncommon but allowed on Windows.