Check that python tools are installed.
This commit is contained in:
parent
24f8c576be
commit
69c957985a
1 changed files with 3 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue