mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-17 22:07:47 +00:00
![]() ## Summary The generated `pyvenv.cfg` file hardcodes `implementation = CPython` even for PyPy venvs, created with `uv venv venv --python pypy3.10`, for example. ```ini home = /path/to/.pyenv/versions/pypy3.10-7.3.15/bin implementation = CPython version_info = 3.10 gourgeist = 0.0.4 include-system-site-packages = false base-prefix = /path/to/.pyenv/versions/pypy3.10-7.3.15 base-exec-prefix = /path/to/.pyenv/versions/pypy3.10-7.3.15 base-executable = /path/to/.pyenv/versions/pypy3.10-7.3.15/bin/pypy3.10 ``` ## Test Plan Manually verified that `pyvenv.cfg` now contains `implementation = PyPy`. I can try refactoring `create_bare_venv` to make it more easily testable, though. |
||
---|---|---|
.. | ||
src | ||
static | ||
benchmark.sh | ||
Cargo.toml | ||
compare_in_git.sh | ||
imasnake.py | ||
oranda.json | ||
README.md | ||
venv_checker.py |
Gourgeist
Gourgeist is a rust library to create python virtual environments. It also has a CLI.
It currently supports only unix (linux/mac), windows support is missing.
Rust
use camino::Utf8PathBuf;
use gourgeist::{create_venv, get_interpreter_info, parse_python_cli};
let location = cli.path.unwrap_or(Utf8PathBuf::from(".venv"));
let python = parse_python_cli(cli.python)?;
let data = get_interpreter_info(&python)?;
create_venv(&location, &python, &data, cli.bare)?;
CLI
Use python
as base for a virtualenv .venv
:
gourgeist
Or use custom defaults:
gourgeist -p 3.11 my_env