Description: Remove distutils to work with Python3.12
Bug-Debian: https://bugs.debian.org/1061805
Author: Andreas Tille <tille@debian.org>
Last-Update: 2024-02-02

--- a/kleborate/__main__.py
+++ b/kleborate/__main__.py
@@ -13,7 +13,7 @@ not, see <http://www.gnu.org/licenses/>.
 """
 
 import argparse
-import distutils.spawn
+import shutil
 import gzip
 import os
 import pathlib
@@ -174,14 +174,14 @@ def check_inputs_and_programs(args):
             header, seq = record
             if len(seq) == 0:
                 sys.exit('Error: invalid FASTA file (contains a zero-length sequence): ' + assembly)
-    if not distutils.spawn.find_executable('makeblastdb'):
+    if not shutil.which('makeblastdb'):
         sys.exit('Error: could not find makeblastdb')
-    if not distutils.spawn.find_executable('blastn'):
+    if not shutil.which('blastn'):
         sys.exit('Error: could not find blastn')
     if args.resistance:
-        if not distutils.spawn.find_executable('blastx'):
+        if not shutil.which('blastx'):
             sys.exit('Error: could not find blastx')
-    if not distutils.spawn.find_executable('mash'):
+    if not shutil.which('mash'):
         sys.exit('Error: could not find mash')
     major, minor, patch = get_blast_version()
     if major < 2 or (major == 2 and minor < 7):
