python3.pkgs.pythonRuntimeDepsCheckHook: skip empty specifiers

Prevent the hook from erroring out on missing specifiers, as reported for
`highspy`, which currently ships with a pre-release version, triggering
the following error message:

  - highspy not satisfied by version 1.7.1.dev1
This commit is contained in:
Martin Weinelt 2024-03-22 16:25:55 +01:00
parent 0cb727d0b5
commit bcd6e799e0
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ def test_requirement(requirement: Requirement) -> bool:
error(f"{package_name} not installed")
return False
if package.version not in requirement.specifier:
if requirement.specifier and package.version not in requirement.specifier:
error(
f"{package_name}{requirement.specifier} not satisfied by version {package.version}"
)