about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/mat2/paths.patch
blob: 784e04cda38365881bfe400125c6eda20fa432e6 (plain) (blame)
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
diff --git a/dolphin/mat2.desktop b/dolphin/mat2.desktop
index 41c8de4..11df258 100644
--- a/dolphin/mat2.desktop
+++ b/dolphin/mat2.desktop
@@ -8,6 +8,6 @@ Type=Service
 Name=Clean metadata
 Name[de]=Metadaten löschen
 Name[es]=Limpiar metadatos
-Icon=/usr/share/icons/hicolor/scalable/apps/mat2.svg
-Exec=kdialog --yesno  "$( mat2 -s %F )" --title "Clean Metadata?" && mat2 %U
-Exec[de]=kdialog --yesno  "$( mat2 -s %F )" --title "Metadaten löschen?" && mat2 %U
+Icon=@mat2svg@
+Exec=@kdialog@ --yesno  "$( @mat2@ -s %F )" --title "Clean Metadata?" && @mat2@ %U
+Exec[de]=@kdialog@ --yesno  "$( @mat2@ -s %F )" --title "Metadaten löschen?" && @mat2@ %U
diff --git a/libmat2/exiftool.py b/libmat2/exiftool.py
index eb65b2a..51a0fa1 100644
--- a/libmat2/exiftool.py
+++ b/libmat2/exiftool.py
@@ -1,8 +1,6 @@
-import functools
 import json
 import logging
 import os
-import shutil
 import subprocess
 from typing import Dict, Union, Set
 
@@ -70,14 +68,5 @@ class ExiftoolParser(abstract.AbstractParser):
             return False
         return True
 
-@functools.lru_cache()
 def _get_exiftool_path() -> str:  # pragma: no cover
-    which_path = shutil.which('exiftool')
-    if which_path:
-        return which_path
-
-    # Exiftool on Arch Linux has a weird path
-    if os.access('/usr/bin/vendor_perl/exiftool', os.X_OK):
-        return '/usr/bin/vendor_perl/exiftool'
-
-    raise RuntimeError("Unable to find exiftool")
+    return '@exiftool@'
diff --git a/libmat2/video.py b/libmat2/video.py
index ae9e463..2acc65c 100644
--- a/libmat2/video.py
+++ b/libmat2/video.py
@@ -1,6 +1,4 @@
 import subprocess
-import functools
-import shutil
 import logging
 
 from typing import Dict, Union
@@ -135,10 +133,5 @@ class MP4Parser(AbstractFFmpegParser):
     }
 
 
-@functools.lru_cache()
 def _get_ffmpeg_path() -> str:  # pragma: no cover
-    which_path = shutil.which('ffmpeg')
-    if which_path:
-        return which_path
-
-    raise RuntimeError("Unable to find ffmpeg")
+    return '@ffmpeg@'