File: rm-setuptools.patch

package info (click to toggle)
changeo 1.3.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,420 kB
  • sloc: python: 7,096; sh: 116; makefile: 5
file content (87 lines) | stat: -rw-r--r-- 3,069 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Description: remove setuptools from runtime dependencies.
 This allows dh-python to cease filling python3:Dependencies substvar
 with the deprecated python3-pkg-resources.  The patch may be beneficial
 upstream since other automated tools may pull setuptools unnecessarily
 due to its presence in requirements files.
Author: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/1083334
Forwarded: no
Last-Update: 2024-10-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/changeo.egg-info/requires.txt
+++ b/changeo.egg-info/requires.txt
@@ -3,6 +3,5 @@
 pandas>=0.24
 biopython>=1.77
 PyYAML>=5.1
-setuptools>=2.0
 presto>=0.7.0
 airr>=1.3.1
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,6 +3,5 @@
 pandas>=0.24
 biopython>=1.77
 PyYAML>=5.1
-setuptools>=2.0
 presto>=0.7.0
 airr>=1.3.1
--- a/bin/AssignGenes.py
+++ b/bin/AssignGenes.py
@@ -11,7 +11,7 @@
 import shutil
 from argparse import ArgumentParser
 from collections import OrderedDict
-from pkg_resources import parse_version
+from packaging.version import parse as parse_version
 from textwrap import dedent
 from time import time
 import re
--- a/changeo/Distance.py
+++ b/changeo/Distance.py
@@ -9,7 +9,7 @@
 import numpy as np
 import pandas as pd
 from itertools import combinations, product, zip_longest
-from pkg_resources import resource_stream
+from importlib.resources import open_text
 from scipy.cluster.hierarchy import fcluster, linkage
 from scipy.spatial.distance import squareform
 
@@ -220,22 +220,22 @@
 ham_model = getDNADistMatrix(mask_dist=0, gap_dist=0)
 
 # Load model data
-with resource_stream(__name__, 'data/hh_s1f_dist.tsv') as f:
+with open_text('changeo', 'data/hh_s1f_dist.tsv') as f:
     hh_s1f_model = pd.read_csv(f, sep='\t', index_col=0)
 
-with resource_stream(__name__, 'data/hh_s5f_dist.tsv') as f:
+with open_text('changeo', 'data/hh_s5f_dist.tsv') as f:
     hh_s5f_model = pd.read_csv(f, sep='\t', index_col=0)
 
-with resource_stream(__name__, 'data/mk_rs1nf_dist.tsv') as f:
+with open_text('changeo', 'data/mk_rs1nf_dist.tsv') as f:
     mk_rs1nf_model = pd.read_csv(f, sep='\t', index_col=0)
 
-with resource_stream(__name__, 'data/mk_rs5nf_dist.tsv') as f:
+with open_text('changeo', 'data/mk_rs5nf_dist.tsv') as f:
     mk_rs5nf_model = pd.read_csv(f, sep='\t', index_col=0)
 
-with resource_stream(__name__, 'data/m1n_compat_dist.tsv') as f:
+with open_text('changeo', 'data/m1n_compat_dist.tsv') as f:
     m1n_compat_model = pd.read_csv(f, sep='\t', index_col=0)
 
-with resource_stream(__name__, 'data/hs1f_compat_dist.tsv') as f:
+with open_text('changeo', 'data/hs1f_compat_dist.tsv') as f:
     hs1f_compat_model = pd.read_csv(f, sep='\t', index_col=0)
 
 distance_models = {'ham': ham_model,
@@ -245,4 +245,4 @@
                    'mk_rs1nf': mk_rs1nf_model,
                    'mk_rs5nf': mk_rs5nf_model,
                    'm1n_compat': m1n_compat_model,
-                   'hs1f_compat': hs1f_compat_model}
\ No newline at end of file
+                   'hs1f_compat': hs1f_compat_model}