Merge pull request #2822 from pypeclub/enhancement/custom_find_executable

General: Custom function for find executable
This commit is contained in:
Jakub Trllo 2022-03-08 10:44:02 +01:00 committed by GitHub
commit 5bfbe4ea53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 28 deletions

View file

@ -7,7 +7,6 @@ import platform
import collections
import inspect
import subprocess
import distutils.spawn
from abc import ABCMeta, abstractmethod
import six
@ -36,8 +35,10 @@ from .python_module_tools import (
modules_from_path,
classes_from_module
)
from .execute import get_linux_launcher_args
from .execute import (
find_executable,
get_linux_launcher_args
)
_logger = None
@ -647,7 +648,7 @@ class ApplicationExecutable:
def _realpath(self):
"""Check if path is valid executable path."""
# Check for executable in PATH
result = distutils.spawn.find_executable(self.executable_path)
result = find_executable(self.executable_path)
if result is not None:
return result