python3.pkgs.pythonRuntimeDepsCheckHook: allow prereleases

Updating to prereleases should be possible, but making this an option is
difficult, given that for packages with many consumers you would have to
set it in each consumer.

We thoroughly test the package set, so allowing prereleases unconditionally
shouldn't be too bad.

Closes: #301698
This commit is contained in:
Martin Weinelt
2024-10-28 22:04:57 +01:00
parent ddc3140a99
commit d6c1a5e4e2
@@ -78,6 +78,9 @@ def test_requirement(requirement: Requirement) -> bool:
error(f"{package_name} not installed")
return False
# Allow prereleases, to give to give us some wiggle-room
requirement.specifier.prereleases = True
if requirement.specifier and package.version not in requirement.specifier:
error(
f"{package_name}{requirement.specifier} not satisfied by version {package.version}"