25 lines
814 B
Python
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)
|