mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-01 20:31:12 +00:00
Make target Python version an optional field (#4000)
## Summary Instead of checking if the target and installed version are the same, we model the data such that the target version is only present if it was specified by the user. This also means that we correctly say "requested version" even if the two happen to be the same.
This commit is contained in:
parent
037e7e345c
commit
77e93157fb
9 changed files with 61 additions and 35 deletions
|
|
@ -150,9 +150,8 @@ impl<'a> BuildContext for BuildDispatch<'a> {
|
|||
}
|
||||
|
||||
async fn resolve<'data>(&'data self, requirements: &'data [Requirement]) -> Result<Resolution> {
|
||||
let python_requirement = PythonRequirement::from_interpreter(self.interpreter);
|
||||
let markers = self.interpreter.markers();
|
||||
let python_requirement =
|
||||
PythonRequirement::from_marker_environment(self.interpreter, markers);
|
||||
let tags = self.interpreter.tags()?;
|
||||
let resolver = Resolver::new(
|
||||
Manifest::simple(requirements.to_vec()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue