mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-26 20:19:08 +00:00
Use the right marker for the implementation
field of pyvenv.cfg
(#1785)
## 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.
This commit is contained in:
parent
f13d0adbcd
commit
2e60c1d734
1 changed files with 4 additions and 1 deletions
|
@ -220,7 +220,10 @@ pub fn create_bare_venv(
|
|||
};
|
||||
let pyvenv_cfg_data = &[
|
||||
("home", python_home),
|
||||
("implementation", "CPython".to_string()),
|
||||
(
|
||||
"implementation",
|
||||
interpreter.markers().platform_python_implementation.clone(),
|
||||
),
|
||||
(
|
||||
"version_info",
|
||||
interpreter.markers().python_version.string.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue