mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
pep508: un-export fields for MarkerEnvironment
We now use the getters and setters everywhere. There were some places where we wanted to build a `MarkerEnvironment` out of whole cloth, usually in tests. To facilitate those use cases, we add a `MarkerEnvironmentBuilder` that provides a convenient constructor. It's basically like a `MarkerEnvironment::new`, but with named parameters. That's useful here because there are so many fields (and they many have the same type).
This commit is contained in:
parent
be12cfb2b8
commit
7d67b7bb49
11 changed files with 198 additions and 169 deletions
|
@ -235,12 +235,15 @@ pub fn create_bare_venv(
|
|||
),
|
||||
(
|
||||
"implementation".to_string(),
|
||||
interpreter.markers().platform_python_implementation.clone(),
|
||||
interpreter
|
||||
.markers()
|
||||
.platform_python_implementation()
|
||||
.to_string(),
|
||||
),
|
||||
("uv".to_string(), version().to_string()),
|
||||
(
|
||||
"version_info".to_string(),
|
||||
interpreter.markers().python_full_version.string.clone(),
|
||||
interpreter.markers().python_full_version().string.clone(),
|
||||
),
|
||||
(
|
||||
"include-system-site-packages".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue