Filter out incompatible dists (#398)

Filter out source dists and wheels whose `requires-python` from the
simple api is incompatible with the current python version.

This change showed an important problem: When we use a fake python
version for resolving, building source distributions breaks down because
we can only build with versions we actually have.

This change became surprisingly big. The tests now require python 3.7 to
be installed, but changing that would mean an even bigger change.

Fixes #388
This commit is contained in:
konsti 2023-11-13 17:14:07 +01:00 committed by GitHub
parent 81c9cd0d4a
commit 76a41066ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 365 additions and 187 deletions

View file

@ -135,7 +135,7 @@ impl BuildContext for BuildDispatch {
if remote.len() == 1 { "" } else { "s" },
remote.iter().map(ToString::to_string).join(", ")
);
let resolution = DistFinder::new(&tags, &self.client)
let resolution = DistFinder::new(&tags, &self.client, self.interpreter_info())
.resolve(&remote)
.await
.context("Failed to resolve build dependencies")?;