1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
--- a/kleborate/__main__.py
+++ b/kleborate/__main__.py
@@ -21,7 +21,7 @@
import sys
import tempfile
-from pkg_resources import resource_filename
+from importlib import resources
from .contig_stats import get_contig_stat_results
from .help_formatter import MyParser, MyHelpFormatter
from .kaptive import get_kaptive_paths, get_kaptive_results
@@ -365,8 +365,9 @@
def get_data_path():
- return resource_filename(__name__, 'data')
-
+ # bad bad patch
+ with resources.as_file(resources.files('kleborate') / 'data') as fd:
+ return str(fd)
def get_chromosome_mlst_header():
return ['gapA', 'infB', 'mdh', 'pgi', 'phoE', 'rpoB', 'tonB']
|