Skip to content

Commit

Permalink
Use shutil.which instead of sh.which (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
misl6 authored Jul 19, 2022
1 parent 6446352 commit b9e9384
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kivy_ios/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def get_env(self):
use_ccache = environ.get("USE_CCACHE", "1")
ccache = None
if use_ccache == "1":
ccache = sh.which('ccache')
ccache = shutil.which('ccache')
if ccache:
ccache = ccache.strip()
env["USE_CCACHE"] = "1"
Expand Down Expand Up @@ -361,9 +361,9 @@ def __init__(self):
Arch64IOS(self))

# path to some tools
self.ccache = sh.which("ccache")
self.ccache = shutil.which("ccache")
for cython_fn in ("cython-2.7", "cython"):
cython = sh.which(cython_fn)
cython = shutil.which(cython_fn)
if cython:
self.cython = cython
break
Expand All @@ -373,15 +373,15 @@ def __init__(self):

# check the basic tools
for tool in ("pkg-config", "autoconf", "automake", "libtool"):
if not sh.which(tool):
if not shutil.which(tool):
logger.error("Missing requirement: {} is not installed".format(
tool))

if not ok:
sys.exit(1)

self.use_pigz = sh.which('pigz')
self.use_pbzip2 = sh.which('pbzip2')
self.use_pigz = shutil.which('pigz')
self.use_pbzip2 = shutil.which('pbzip2')

try:
num_cores = int(sh.sysctl('-n', 'hw.ncpu'))
Expand Down

0 comments on commit b9e9384

Please sign in to comment.