File: python3-pkg-resources.patch

package info (click to toggle)
kleborate 2.4.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 175,052 kB
  • sloc: python: 3,498; sh: 76; makefile: 10
file content (23 lines) | stat: -rw-r--r-- 669 bytes parent folder | download
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']