From 69c957985ab82fa693df71a80bb9a4d570eef375 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sat, 11 Apr 2020 22:55:19 +1000 Subject: [PATCH] Check that python tools are installed. --- eris/tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eris/tools.py b/eris/tools.py index 16c6c45..0d85b82 100755 --- a/eris/tools.py +++ b/eris/tools.py @@ -680,6 +680,9 @@ def splitext(path): @functools.lru_cache() def is_tool_available(tool): + if (hasattr(tool, "command") and + tool.command.startswith(f"{PYTHON_EXECUTABLE} -m ")): + return importlib.util.find_spec(tool.command.split()[2]) is not None try: return all(shutil.which(executable) for executable in tool.executables) except AttributeError: