File: 00-install-data-files.patch

package info (click to toggle)
glueviz 1.0.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 30,340 kB
  • sloc: python: 44,462; makefile: 138; sh: 70
file content (21 lines) | stat: -rw-r--r-- 749 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Installs under the right directory the package data.
Author: Josue Ortega <josueortega@debian.org.gt>
Last-Update: 2017-07-24
Forwarded: not-needed

--- a/glue/icons/__init__.py
+++ b/glue/icons/__init__.py
@@ -25,8 +25,13 @@
     icon_name += '.{0}'.format(icon_format)
 
     try:
+        """
         if pkg_resources.resource_exists('glue.icons', icon_name):
             return pkg_resources.resource_filename('glue.icons', icon_name)
+        """
+        debian_path = '/'.join(['/usr/share/glue', icon_name])
+        if os.path.exists(debian_path):
+            return debian_path
         else:
             raise RuntimeError("Icon does not exist: %s" % icon_name)
     except NotImplementedError:  # workaround for mac app