Skip to content

Commit 12cd44f

Browse files
committed
MNT: Drop distutils.spawn.find_executable for shutils.which
1 parent 5c7f2db commit 12cd44f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nipype/interfaces/afni/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""Provide a base interface to AFNI commands."""
55
import os
66
from sys import platform
7-
from distutils import spawn
7+
import shutil
88

99
from ... import logging, LooseVersion
1010
from ...utils.filemanip import split_filename, fname_presuffix
@@ -317,7 +317,7 @@ class AFNIPythonCommand(AFNICommand):
317317
def cmd(self):
318318
"""Revise the command path."""
319319
orig_cmd = super(AFNIPythonCommand, self).cmd
320-
found = spawn.find_executable(orig_cmd)
320+
found = shutil.which(orig_cmd)
321321
return found if found is not None else orig_cmd
322322

323323
@property

nipype/interfaces/mrtrix3/connectivity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ def _parse_inputs(self, skip=None):
208208
skip = []
209209

210210
if not isdefined(self.inputs.in_config):
211-
from distutils.spawn import find_executable
211+
from shutil import which
212212

213-
path = find_executable(self._cmd)
213+
path = which(self._cmd)
214214
if path is None:
215215
path = os.getenv(MRTRIX3_HOME, "/opt/mrtrix3")
216216
else:

0 commit comments

Comments
 (0)