mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Enforce target and interpreter requires-python
versions (#532)
## Summary This PR modifies the behavior of our `--python-version` override in two ways: 1. First, we always use the "real" interpreter in the source distribution builder. I think this is correct. We don't need to use the fake markers for recursive builds, because all we care about is the top-level resolution, and we already assume that a single source distribution will always return the same metadata regardless of its build environment. 2. Second, we require that source distributions are compatible with _both_ the "real" interpreter version and the marker environment. This ensures that we don't try to build source distributions that are compatible with our interpreter, but incompatible with the target version. Closes https://github.com/astral-sh/puffin/issues/407.
This commit is contained in:
parent
d96c18b3a8
commit
0ac4254a7e
4 changed files with 21 additions and 23 deletions
|
@ -95,12 +95,6 @@ impl Interpreter {
|
|||
pub fn sys_executable(&self) -> &Path {
|
||||
&self.sys_executable
|
||||
}
|
||||
|
||||
/// Inject markers of a fake python version
|
||||
#[must_use]
|
||||
pub fn patch_markers(self, markers: MarkerEnvironment) -> Self {
|
||||
Self { markers, ..self }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue