Changeset View
Changeset View
Standalone View
Standalone View
files/0001-Move-aqt_data-to-sys.prefix-share.patch
- This file was added.
| From d7ecae49a8a46e5ad5f25726044a25006fd1f006 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] 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 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/anki", "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 6d498994..d67a8791 100644 | |||||
| --- a/qt/setup.py | |||||
| +++ b/qt/setup.py | |||||
| @@ -9,7 +9,7 @@ with open("../meta/version") as fh: | |||||
| 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/anki", path), [os.path.join(path, f) for f in filenames])) | |||||
| return entries | |||||
| -- | |||||
| 2.26.0 | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.