[arch-commits] Commit in anki/trunk (0001-Move-aqt_data-to-sys.prefix-share.patch)

Johannes Löthberg demize at archlinux.org
Mon May 4 16:00:49 UTC 2020


    Date: Monday, May 4, 2020 @ 16:00:48
  Author: demize
Revision: 624738

Add missing 0001 patch

Added:
  anki/trunk/0001-Move-aqt_data-to-sys.prefix-share.patch

----------------------------------------------+
 0001-Move-aqt_data-to-sys.prefix-share.patch |   45 +++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

Added: 0001-Move-aqt_data-to-sys.prefix-share.patch
===================================================================
--- 0001-Move-aqt_data-to-sys.prefix-share.patch	                        (rev 0)
+++ 0001-Move-aqt_data-to-sys.prefix-share.patch	2020-05-04 16:00:48 UTC (rev 624738)
@@ -0,0 +1,45 @@
+From 0c0cceb3ac9ceb18effa5e82d655cd5a01a25ce9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes at kyriasis.com>
+Date: Sun, 29 Mar 2020 06:24:43 +0200
+Subject: [PATCH 1/2] 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 at 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 a0e12362..4d8c8c34 100644
+--- a/qt/aqt/utils.py
++++ b/qt/aqt/utils.py
+@@ -21,7 +21,7 @@ from aqt.theme import theme_manager
+ 
+ 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 38f4e2b7..bdda3baa 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.26.2
+



More information about the arch-commits mailing list