summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-11-16 15:49:47 +0100
committerWojtek Kosior <koszko@koszko.org>2021-11-16 16:45:23 +0100
commit6a6fbe6c1b5f663ad7adf6a66d16c354214f9d57 (patch)
treef9328ad8d069a58cf3d41f8cfcac6996010fa5b8 /setup.py
parent3a080cfea46096f4c4a3d3d0e81e269ca6de6245 (diff)
downloadhaketilo-hydrilla-6a6fbe6c1b5f663ad7adf6a66d16c354214f9d57.tar.gz
haketilo-hydrilla-6a6fbe6c1b5f663ad7adf6a66d16c354214f9d57.zip
fix debian packaging
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 4f87ecc..28d9ca5 100755
--- a/setup.py
+++ b/setup.py
@@ -21,14 +21,21 @@ from setuptools import setup, find_packages
import sys
import pathlib
+def files_find(package_path, subpath, rglob):
+ package_path = pathlib.Path(package_path)
+ for path in (package_path / subpath).rglob(rglob):
+ if not path.is_dir():
+ yield str(path.relative_to(package_path))
+
settings = {}
settings['version'] = '0.2'
settings['app_package_name'] = 'pydrilla'
settings['project_root'] = pathlib.Path(__file__).resolve().parent
packages_root = settings['project_root'] / 'src'
main_package_dir = packages_root / settings['app_package_name']
+test_dir = packages_root / 'test'
settings['locales_dir'] = main_package_dir / 'locales'
-settings['config_path'] = main_package_dir / 'development_config.json'
+settings['config_path'] = test_dir / 'development_config.json'
sys.path.insert(0, str(packages_root))
import test
@@ -63,8 +70,10 @@ setup(
'test': ['pytest'],
},
package_data={
- 'pydrilla': ['config.json', *helper.locale_files_relative()],
- 'test': []
+ 'pydrilla': ['config.json', *helper.locale_files_relative(),
+ *files_find(main_package_dir, 'templates', '*.html')],
+ 'test': [*files_find(packages_root / 'test', 'example_content', '*'),
+ 'development_config.json']
},
cmdclass=helper.commands()
# project_urls={