8000 MNT: Drop distutils by effigies · Pull Request #3458 · nipy/nipype · GitHub
[go: up one dir, main page]

Skip to content

MNT: Drop distutils #3458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
MNT: Drop distutils.spawn.find_executable for shutils.which
  • Loading branch information
effigies committed May 10, 2022
commit 12cd44f17fade0406bf4bfa877e485f44870e11b
4 changes: 2 additions & 2 deletions nipype/interfaces/afni/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""Provide a base interface to AFNI commands."""
import os
from sys import platform
from distutils import spawn
import shutil

from ... import logging, LooseVersion
from ...utils.filemanip import split_filename, fname_presuffix
Expand Down Expand Up @@ -317,7 +317,7 @@ class AFNIPythonCommand(AFNICommand):
def cmd(self):
"""Revise the command path."""
orig_cmd = super(AFNIPythonCommand, self).cmd
found = spawn.find_executable(orig_cmd)
found = shutil.which(orig_cmd)
return found if found is not None else orig_cmd

@property
Expand Down
4 changes: 2 additions & 2 deletions nipype/interfaces/mrtrix3/connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ def _parse_inputs(self, skip=None):
skip = []

if not isdefined(self.inputs.in_config):
from distutils.spawn import find_executable
from shutil import which

path = find_executable(self._cmd)
path = which(self._cmd)
if path is None:
path = os.getenv(MRTRIX3_HOME, "/opt/mrtrix3")
else:
Expand Down
0