1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
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
@@ -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):
|