Skip to content

Commit

Permalink
fix: remove distutils in favor of shutil to support python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
onjin committed Oct 3, 2024
1 parent 77da334 commit ddbcc4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ output/*/index.html

# Sphinx
docs/_build
.venv
.direnv
4 changes: 2 additions & 2 deletions runenv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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]):
Expand Down

0 comments on commit ddbcc4e

Please sign in to comment.