From ef024f685c223fdbe335b517f6002375843c7277 Mon Sep 17 00:00:00 2001 From: sezanzeb Date: Sat, 21 Nov 2020 16:47:16 +0100 Subject: [PATCH] correct prefix in .policy --- setup.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index d98b8dce..e361822c 100644 --- a/setup.py +++ b/setup.py @@ -31,14 +31,11 @@ class Install(DistUtilsExtra.auto.install_auto): def ensure_polkit_prefix(self): """Make sure the policy file uses the right prefix.""" - policy_path = os.path.join( - self.install_data, - 'share/polkit-1/actions/org.key-mapper.policy' - ) - executable = os.path.join(self.install_data, 'bin/key-mapper-gtk') assert os.path.exists(executable) + policy_path = '/usr/share/polkit-1/actions/org.key-mapper.policy' + with open(policy_path, 'r') as f: contents = f.read() if not '{executable}' in contents: