Debian Codegraph @

debian/patches/disable-pkg-resources.patch

raw symbols SCIP
1 Description: workaround to remove python3-pkg-resources.
2 This patch works around the use of pkg_resources.resource_filename by
3 hardwiring the expected file name, since it is going to land at a known
4 location. Such workaround is not suitable for forwarding upstream.
5 Author: Étienne Mollier <[email protected]>
6 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1125838
7 Forwarded: not-needed
8 Last-Update: 2026-02-05
9 ---
10 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
11 --- pycoqc.orig/pycoQC/__main__.py
12 +++ pycoqc/pycoQC/__main__.py
13 @@ -6,7 +6,6 @@
14 import argparse
15 import sys
16 import textwrap
17 -from pkg_resources import resource_filename
18
19 # Third party imports
20 from jinja2 import Environment, PackageLoader, Template
21 @@ -96,7 +95,7 @@
22
23 # Print the default config parameters and exit
24 if args.default_config:
25 - config_file = resource_filename("pycoQC", "templates/pycoQC_config.json")
26 + config_file = "/usr/lib/python3/dist-packages/pycoQC/templates/pycoQC_config.json"
27 with open (config_file) as fp:
28 sys.stdout.write(fp.read())
29 sys.exit()
30 --- pycoqc.orig/pycoQC/pycoQC_report.py
31 +++ pycoqc/pycoQC/pycoQC_report.py
32 @@ -4,7 +4,6 @@
33 #~~~~~~~~~~~~~~IMPORTS~~~~~~~~~~~~~~#
34 # Standard library imports
35 import json
36 -from pkg_resources import resource_filename
37 import datetime
38 import os
39
40 @@ -170,7 +169,7 @@
41
42 # Last use the default harcoded config_dict
43 self.logger.debug ("\tRead default configuration file")
44 - config_file = resource_filename("pycoQC", "templates/pycoQC_config.json")
45 + config_file = "/usr/lib/python3/dist-packages/pycoQC/templates/pycoQC_config.json"
46 with open(config_file, 'r') as cf:
47 return json.load(cf)
48