From bcd6e799e0a53f8f85e1faf6676bfab20e02ca4d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 22 Mar 2024 16:25:55 +0100 Subject: [PATCH] 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 --- .../interpreters/python/hooks/python-runtime-deps-check-hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py b/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py index 5a3a91939175..11687e585121 100644 --- a/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py +++ b/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py @@ -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}" )