From 5970785836062a2a3016b309c53dc00da7232930 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Tue, 25 Jul 2017 17:19:40 +0200 Subject: [PATCH] Update setup.py --- setup.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 1ad67ea4..c2629324 100755 --- a/setup.py +++ b/setup.py @@ -1,9 +1,27 @@ #!/bin/python #https://python-packaging.readthedocs.io/en/latest/minimal.html -import os +import os, glob from setuptools import find_packages from setuptools import setup fenrirVersion = '1.5' + +data_files = [] +directories = glob.glob('config/*') +for directory in directories: + files = glob.glob(directory+'/*') + destDir = '/etc/fenrir' + if directory == 'config/punctuation': + destDir = '/etc/fenrir/punctuation' + elif directory == 'config/keyboard': + destDir = '/etc/fenrir/keyboard' + if directory == 'config/settings': + destDir = '/etc/fenrir/settings' + elif directory == 'config/scripts': + destDir = '/usr/share/fenrir/scripts/' + elif directory == 'config/sound': + destDir = '/usr/share/sounds/fenrir' + data_files.append((destDir, files)) + def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() @@ -39,7 +57,7 @@ setup( include_package_data=True, zip_safe=False, - data_files=[('/etc/fenrir', ['config/*']), + data_files=data_files, ],