Add requirements to setup
This commit is contained in:
parent
764bb0f563
commit
31c1e9ffb0
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
||||
dist/
|
||||
build/
|
||||
__pycache__
|
||||
greenhouse.egg-info/
|
||||
|
7
setup.py
7
setup.py
@ -2,7 +2,7 @@
|
||||
'''
|
||||
@author: Thomas Klaehn <tkl@blackfinn.de>
|
||||
'''
|
||||
from distutils.core import setup
|
||||
from setuptools import setup
|
||||
import os
|
||||
import shutil
|
||||
import stat
|
||||
@ -15,6 +15,7 @@ EMAIL = 'tkl@blackfinn.de'
|
||||
SYSTEMD_SCRIPTS = ['greenhouse.service']
|
||||
PACKAGES = ['greenhouse']
|
||||
PACKAGE_DIRS = {'greenhouse':'greenhouse'}
|
||||
REQUIRES = ['RPi.GPIO', 'Adafruit_DHT', 'paho-mqtt']
|
||||
|
||||
SYSTEMD_PATH = '/lib/systemd/system/'
|
||||
|
||||
@ -22,7 +23,7 @@ if sys.argv[1] == 'install':
|
||||
for script in SYSTEMD_SCRIPTS:
|
||||
shutil.copyfile(script, os.path.join(SYSTEMD_PATH, script))
|
||||
os.chmod(os.path.join(SYSTEMD_PATH, script), stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH)
|
||||
setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL, package_dir=PACKAGE_DIRS, packages=PACKAGES)
|
||||
setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL, package_dir=PACKAGE_DIRS, packages=PACKAGES, install_requires=REQUIRES)
|
||||
elif sys.argv[1] == 'sdist':
|
||||
setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL, package_dir=PACKAGE_DIRS, packages=PACKAGES,
|
||||
setup(name=NAME, version=VERSION, author=AUTHOR, author_email=EMAIL, package_dir=PACKAGE_DIRS, packages=PACKAGES, install_requires=REQUIRES,
|
||||
scripts=SYSTEMD_SCRIPTS)
|
||||
|
Loading…
Reference in New Issue
Block a user