Skip to content

Commit

Permalink
Removing reference to distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Jun 3, 2024
1 parent a8a3ab1 commit 496985e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions armi/bookkeeping/db/tests/test_database3.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests for the Database3 class."""
from distutils.spawn import find_executable
import shutil
import subprocess
import unittest

Expand All @@ -31,9 +31,9 @@

# determine if this is a parallel run, and git is installed
GIT_EXE = None
if find_executable("git") is not None:
if shutil.which("git") is not None:
GIT_EXE = "git"
elif find_executable("git.exe") is not None:
elif shutil.which("git.exe") is not None:
GIT_EXE = "git.exe"


Expand Down
6 changes: 3 additions & 3 deletions armi/tests/test_mpiFeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
or
mpiexec.exe -n 2 python -m pytest armi/tests/test_mpiFeatures.py
"""
from distutils.spawn import find_executable
from unittest.mock import patch
import os
import shutil
import unittest

from armi import context
Expand All @@ -47,9 +47,9 @@

# determine if this is a parallel run, and MPI is installed
MPI_EXE = None
if find_executable("mpiexec.exe") is not None:
if shutil.which("mpiexec.exe") is not None:
MPI_EXE = "mpiexec.exe"
elif find_executable("mpiexec") is not None:
elif shutil.which("mpiexec") is not None:
MPI_EXE = "mpiexec"

MPI_COMM = context.MPI_COMM
Expand Down
6 changes: 3 additions & 3 deletions armi/tests/test_mpiParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests of the MPI portion of the Parameters class."""
from distutils.spawn import find_executable
import shutil
import unittest

from armi import context
Expand All @@ -21,9 +21,9 @@

# determine if this is a parallel run, and MPI is installed
MPI_EXE = None
if find_executable("mpiexec.exe") is not None:
if shutil.which("mpiexec.exe") is not None:
MPI_EXE = "mpiexec.exe"
elif find_executable("mpiexec") is not None:
elif shutil.which("mpiexec") is not None:
MPI_EXE = "mpiexec"


Expand Down

0 comments on commit 496985e

Please sign in to comment.