chickenhouse/setup.py
Thomas Klaehn 35d1aa796c gate: add 2nd. gate
Signed-off-by: Thomas Klaehn <thomas.klaehn@u-blox.com>
2018-08-27 11:27:58 +02:00

25 lines
814 B
Python

#!/usr/bin/env python
from distutils.core import setup
import shutil
import os
import stat
import sys
NAME = 'chickenhouse'
VERSION = '1.0.0'
AUTHOR = 'tkl'
EMAIL = 'tkl@blackfinn.de'
URL = 'https://git.blackfinn.de/python/chickenhouse'
PACKAGES = ['gate_guard']
SCRIPTS = ['chickenhouse.service']
if sys.argv[1] == 'install':
shutil.copyfile('chickenhouse.service', '/lib/systemd/system/chickenhouse.service')
os.chmod('/lib/systemd/system/chickenhouse.service',
stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH)
setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL,
url=URL, packages=PACKAGES)
elif sys.argv[1] == 'sdist':
setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL,
url=URL, packages=PACKAGES, scripts=SCRIPTS)