summaryrefslogtreecommitdiff
path: root/setup.cfg
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2021-12-26 17:11:37 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2021-12-26 18:28:21 +0100
commitd592880c4bc4c581d8847d96ff73bc319ca1fac2 (patch)
treeac4996aa4d81ef55e68b209d4c541c206f1efe61 /setup.cfg
parent794292740c30bfea48dc23eb62fb6aa531bfdca7 (diff)
Make cards be part of the Python package data
We now load the cards using pkg_resources. This is way better in many aspects: * we can install the package using pip without having issues loading cards * we don't need to chdir to / before running swiftstoryd * we don't need to rely on data_files which is deprecated. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'setup.cfg')
-rw-r--r--setup.cfg11
1 files changed, 4 insertions, 7 deletions
diff --git a/setup.cfg b/setup.cfg
index 6712f5d..5b94f00 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -14,6 +14,7 @@ classifiers =
[options]
packages = find:
python_requires = >=3.7
+include_package_data = True
[options.data_files]
share/swiftstory/www/ =
@@ -26,13 +27,9 @@ share/swiftstory/www/ =
usr/share/swiftstory/www/swiftstory-mobile.js
# TODO install jQuery using libjs-jquery
usr/share/swiftstory/www/jquery.js
-# TODO install cards as package data instead
-share/swiftstory/lang/en/cards =
- usr/share/swiftstory/lang/en/cards/black.json
- usr/share/swiftstory/lang/en/cards/white.json
-share/swiftstory/lang/fr/cards =
- usr/share/swiftstory/lang/fr/cards/black.json
- usr/share/swiftstory/lang/fr/cards/white.json
+
+[options.package_data]
+swiftstory = data/lang/*/cards/*.json
[options.entry_points]
console_scripts =