bicycle-statistics/setup.py
Thomas Klaehn b4d4d844fd bicycle_statistics: Transformed to file system event driven service
Signed-off-by: Thomas Klaehn <thomas.klaehn@u-blox.com>
2018-07-26 17:23:54 +02:00

23 lines
706 B
Python
Executable File

#!/usr/bin/env python
from distutils.core import setup
import sys
import os
import shutil
import stat
NAME = 'bicycle-statistics'
VERSION = '0.1.0'
AUTHOR = 'Thomas Klaehn'
EMAIL = 'tkl@blackfinn.de'
PACKAGES = ['bicycle_statistics', 'gpx_parser', 'gpx2html', 'input_observer']
SCRIPTS = ['example-gpx-parser', 'bicycle-stat']
DAEMON_START_SCRIPT = os.path.join("/lib/systemd/system", "bicycle-stat.service")
if sys.argv[1] == 'install':
shutil.copyfile("bicycle-stat.service", DAEMON_START_SCRIPT)
os.chmod(DAEMON_START_SCRIPT, stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH)
setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL, packages=PACKAGES, scripts=SCRIPTS)