diff --git a/.gitignore b/.gitignore index 74ffd4e..e6acdea 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,5 @@ output/*/index.html # Sphinx docs/_build +.venv +.direnv diff --git a/runenv/__init__.py b/runenv/__init__.py index bf2d5d3..565cb38 100755 --- a/runenv/__init__.py +++ b/runenv/__init__.py @@ -4,10 +4,10 @@ import logging import os import re +import shutil import stat import subprocess import sys -from distutils import spawn logger = logging.getLogger("runenv") @@ -26,7 +26,7 @@ def run(*args): runnable_path = args[1] if not runnable_path.startswith(("/", ".")): - runnable_path = spawn.find_executable(runnable_path) + runnable_path = shutil.which(runnable_path) try: if not (stat.S_IXUSR & os.stat(runnable_path)[stat.ST_MODE]):