diff options
author | Wojtek Kosior <koszko@koszko.org> | 2021-11-16 15:49:47 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2021-11-16 16:45:23 +0100 |
commit | 6a6fbe6c1b5f663ad7adf6a66d16c354214f9d57 (patch) | |
tree | f9328ad8d069a58cf3d41f8cfcac6996010fa5b8 /setup.py | |
parent | 3a080cfea46096f4c4a3d3d0e81e269ca6de6245 (diff) | |
download | haketilo-hydrilla-6a6fbe6c1b5f663ad7adf6a66d16c354214f9d57.tar.gz haketilo-hydrilla-6a6fbe6c1b5f663ad7adf6a66d16c354214f9d57.zip |
fix debian packaging
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -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={ |