add pypy starters

This commit is contained in:
chrys 2018-03-28 18:14:17 +02:00
parent 88a10882f2
commit 36a8549dc0
3 changed files with 50 additions and 1 deletions

View File

@ -77,7 +77,7 @@ setup(
# Packages # Packages
packages=find_packages('src/'), packages=find_packages('src/'),
package_dir={'': 'src/'}, package_dir={'': 'src/'},
scripts=['src/fenrir','src/fenrir-daemon'], scripts=['src/fenrir','src/fenrir-daemon','src/fenrir-pypy','src/fenrir-daemon-pypy'],
# Include additional files into the package # Include additional files into the package
include_package_data=True, include_package_data=True,

28
src/fenrir-daemon-pypy Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env pypy3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
import os, sys, inspect
fenrirPath = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe()))))
if not fenrirPath in sys.path:
sys.path.append(fenrirPath)
from fenrirscreenreader.core import fenrirManager
from daemonize import Daemonize
pidFile = "/run/fenrir.pid"
def main():
app = fenrirManager.fenrirManager()
app.proceed()
del app
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=fenrirPath)
daemon.start()

21
src/fenrir-pypy Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env pypy3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
import os, sys, inspect
fenrirPath = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe()))))
if not fenrirPath in sys.path:
sys.path.append(fenrirPath)
from fenrirscreenreader.core import fenrirManager
def main():
app = fenrirManager.fenrirManager()
app.proceed()
del app
if __name__ == "__main__":
main()