2017-08-22 21:02:31 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2018-07-26 07:53:44 +00:00
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
import shutil
|
|
|
|
import stat
|
2019-08-14 10:48:37 +00:00
|
|
|
from setuptools import setup
|
2017-08-22 21:02:31 +00:00
|
|
|
|
2018-07-26 07:53:44 +00:00
|
|
|
NAME = 'bicycle-statistics'
|
2018-09-05 21:39:54 +00:00
|
|
|
VERSION = '0.2.0'
|
2017-08-22 21:02:31 +00:00
|
|
|
AUTHOR = 'Thomas Klaehn'
|
|
|
|
EMAIL = 'tkl@blackfinn.de'
|
2019-06-16 06:34:37 +00:00
|
|
|
PACKAGES = ['bicycle_statistics', 'gpx_parser', 'gpx2html']
|
2018-07-26 07:53:44 +00:00
|
|
|
SCRIPTS = ['example-gpx-parser', 'bicycle-stat']
|
2020-01-08 11:07:54 +00:00
|
|
|
# REQUIRES = ['geopy', 'gpxpy', 'matplotlib', 'numpy', 'pandas']
|
2018-07-26 07:53:44 +00:00
|
|
|
|
2019-08-14 10:48:37 +00:00
|
|
|
SERVICEDIR = "/lib/systemd/system"
|
|
|
|
|
|
|
|
DAEMON_START_SCRIPT = os.path.join(SERVICEDIR, "bicycle-stat.service")
|
2018-07-26 07:53:44 +00:00
|
|
|
|
|
|
|
if sys.argv[1] == 'install':
|
2019-08-14 10:48:37 +00:00
|
|
|
os.makedirs(SERVICEDIR)
|
2018-07-26 07:53:44 +00:00
|
|
|
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)
|
2017-08-22 21:02:31 +00:00
|
|
|
|
2020-01-08 11:07:54 +00:00
|
|
|
# setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL,
|
|
|
|
# packages=PACKAGES, scripts=SCRIPTS, install_requires=REQUIRES)
|
2019-08-14 10:48:37 +00:00
|
|
|
setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL,
|
2020-01-08 11:07:54 +00:00
|
|
|
packages=PACKAGES, scripts=SCRIPTS)
|