Merge branch 'master' into processing

This commit is contained in:
Chrys 2017-07-25 17:56:33 +02:00
commit 7edebc2962
5 changed files with 37 additions and 9 deletions

View File

@ -1,9 +1,34 @@
#!/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 = ''
if 'config/punctuation' in directory :
destDir = '/etc/fenrir/punctuation'
elif 'config/keyboard' in directory:
destDir = '/etc/fenrir/keyboard'
elif 'config/settings' in directory:
destDir = '/etc/fenrir/settings'
elif 'config/scripts' in directory:
destDir = '/usr/share/fenrir/scripts'
elif 'config/sound' in directory:
if "default-wav" in directory:
destDir = '/usr/share/sounds/fenrir/default-wav'
elif "default" in directory:
destDir = '/usr/share/sounds/fenrir/default'
elif "template" in directory:
destDir = '/usr/share/sounds/fenrir/template'
if destDir != '':
data_files.append((destDir, files))
data_files.append(('/usr/lib/systemd/system/', 'autostart/systemd/fenrir.service'))
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
@ -38,6 +63,8 @@ setup(
# Include additional files into the package
include_package_data=True,
zip_safe=False,
data_files=data_files,
# Dependent packages (distributions)
install_requires=[
@ -45,6 +72,7 @@ setup(
"sox",
"dbus-python",
"pyenchant",
"pyudev",
"setuptools",
],

View File

@ -5,7 +5,7 @@
# By Chrys, Storm Dragon, and contributers.
import glob, os, time, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
currentdir = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe()))))
fenrirPath = os.path.dirname(currentdir)
from core import debug

View File

@ -5,7 +5,7 @@
# By Chrys, Storm Dragon, and contributers.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
currentdir = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe()))))
fenrirPath = os.path.dirname(currentdir)
from configparser import ConfigParser

View File

@ -5,7 +5,7 @@
# By Chrys, Storm Dragon, and contributers.
import os, sys, inspect
fenrirPath = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
fenrirPath = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe()))))
if not fenrirPath in sys.path:
sys.path.append(fenrirPath)

View File

@ -4,11 +4,11 @@
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
import os, sys
import fenrirVersion
import os, sys, inspect
fenrirPath = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe()))))
if not os.path.dirname(os.path.realpath(fenrirVersion.__file__)) in sys.path:
sys.path.append(os.path.dirname(os.path.realpath(fenrirVersion.__file__)))
if not fenrirPath in sys.path:
sys.path.append(fenrirPath)
from core import fenrirManager
from daemonize import Daemonize
@ -23,6 +23,6 @@ def main():
if __name__ == "__main__":
# for debug in foreground
#daemon = Daemonize(app="fenrir-daemon", pid=pidFile, action=main, foreground=True,chdir=os.path.dirname(os.path.realpath(fenrirVersion.__file__)))
daemon = Daemonize(app="fenrir-daemon", pid=pidFile, action=main, chdir=os.path.dirname(os.path.realpath(fenrirVersion.__file__)))
daemon = Daemonize(app="fenrir-daemon", pid=pidFile, action=main, chdir=fenrirPath)
daemon.start()