summarylogtreecommitdiffstats
path: root/0001-Move-aqt_data-to-sys.prefix-share.patch
blob: 3c73464724fd1c66910633dc9f1e5a78af7d6be4 (plain)
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
From 71c4f41d5408731496abe294ce202160b7f3912c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes@kyriasis.com>
Date: Sun, 29 Mar 2020 06:24:43 +0200
Subject: [PATCH 1/5] Move aqt_data to sys.prefix/share
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

These files do _not_ belong right under sys.prefix.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
---
 qt/aqt/utils.py | 2 +-
 qt/setup.py     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/qt/aqt/utils.py b/qt/aqt/utils.py
index b9a2983b..f97c5f19 100644
--- a/qt/aqt/utils.py
+++ b/qt/aqt/utils.py
@@ -24,7 +24,7 @@ if TYPE_CHECKING:
 
 def aqt_data_folder() -> str:
     # wheel install?
-    dir = os.path.join(sys.prefix, "aqt_data")
+    dir = os.path.join(sys.prefix,"share", "aqt_data")
     if not os.path.exists(dir) or not os.listdir(dir):
         # running in place?
         dir = os.path.join(os.path.dirname(__file__), "..", "aqt_data")
diff --git a/qt/setup.py b/qt/setup.py
index 831532e0..da243f9b 100644
--- a/qt/setup.py
+++ b/qt/setup.py
@@ -8,7 +8,7 @@ import setuptools
 def package_files(directory):
     entries = []
     for (path, directories, filenames) in os.walk(directory):
-        entries.append((path, [os.path.join(path, f) for f in filenames]))
+        entries.append((os.path.join("share", path), [os.path.join(path, f) for f in filenames]))
     return entries
 
 
-- 
2.29.2