uv/crates/uv-virtualenv
konstin d8845dc444 Use python from python -m uv as default
Python tools run with `python -m <tool>` will use this `python` as their default python, including pip, virtualenv and the built-in venv. Calling Python tools this way is common, the [pip docs](https://pip.pypa.io/en/stable/user_guide/) use `python -m pip` exclusively, the built-in venv can only be called this way and certain project layouts require `python -m pytest` over `pytest`. This python interpreter takes precedence over the currently active (v)env.

These tools are all written in python and read `sys.executable`. To emulate this, we're setting `UV_DEFAULT_PYTHON` in the python module-launcher shim and read it in the default python discovery, prioritizing it over the active venv. User can also set `UV_DEFAULT_PYTHON` for their own purposes.

The test covers only half of the feature since we don't build the python package before running the tests.

Fixes #2058
Fixes #2222
2024-03-13 12:05:21 +01:00
..
src Use python from python -m uv as default 2024-03-13 12:05:21 +01:00
Cargo.toml Move architecture and operating system probing to Python (#2381) 2024-03-13 11:51:14 +00:00
README.md Rename gourgeist to uv-virtualenv (#2118) 2024-03-01 14:02:40 -05:00

uv-virtualenv

uv-virtualenv is a rust library to create Python virtual environments. It also has a CLI.