File: use-packaging-version.patch

package info (click to toggle)
metaphlan 4.0.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 34,804 kB
  • sloc: python: 7,436; sh: 23; makefile: 14
file content (22 lines) | stat: -rw-r--r-- 952 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
Description: Replace deprecated distutils.version with packaging.version
Author: Harish Chavre<harrych_1@yahoo.com>
--- a/metaphlan/metaphlan.py
+++ b/metaphlan/metaphlan.py
@@ -23,7 +23,7 @@
 import time
 import random
 from collections import defaultdict as defdict
-from distutils.version import LooseVersion
+from packaging.version import parse
 from glob import glob
 from subprocess import DEVNULL
 import argparse as ap
@@ -947,7 +947,7 @@
     #      run.                                                                                   *
     #  George Weingart    05/22/2017   george.weingart@mail.com                                   *
     #**********************************************************************************************
-    if LooseVersion(biom.__version__) < LooseVersion("2.0.0"):
+    if parse(biom.__version__) < parse("2.0.0"):
         biom_table = biom.table.table_factory(
             data,
         sample_ids,