diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-03-22 16:25:55 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-03-22 16:30:55 +0100 |
commit | bcd6e799e0a53f8f85e1faf6676bfab20e02ca4d (patch) | |
tree | 11a7d4f460bc7cdd094941f528e1930dae57a7f7 /pkgs/development/interpreters | |
parent | 0cb727d0b55b974c6790792a2143eaabb99ba6e1 (diff) |
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
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r-- | pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 5a3a919391753..11687e585121e 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}" ) |