forked from alaudet/raspi-sump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·65 lines (58 loc) · 2.36 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from setuptools import setup
import os
version = '1.2'
homedir = '/home/pi/raspi-sump/'
if os.path.isfile(homedir + 'raspisump.conf'):
cmd = 'cp -u ' + homedir + 'raspisump.conf ' + homedir + \
'raspisump.conf.save'
os.system(cmd)
raspi_sump_files = ['bin/rsump.py',
'bin/rsumpchart.py',
'bin/rsumpmonitor.py',
'bin/rsumpwebchart.py'
]
add_files = [(homedir + 'sample_config', ['conf/raspisump.conf']),
(homedir + 'sample_config', ['conf/lighttpd.conf']),
(homedir + 'csv', ['conf/csv/README.md']),
(homedir + 'logs', ['conf/logs/README.md']),
(homedir + 'charts', ['conf/charts/README.md']),
(homedir + 'docs', ['docs/README.md']),
(homedir + 'docs', ['docs/install.md']),
(homedir + 'cron', ['cron/README.md']),
(homedir + 'cron', ['cron/picrontab']),
(homedir + 'web', ['conf/web/index.html']),
(homedir + 'web/images', ['conf/web/images/logo.png']),
(homedir + 'web/css', ['conf/web/css/index.html']),
(homedir + 'web/css', ['conf/web/css/raspi.css'])
]
setup(name='raspisump',
version=version,
description='A sump pit monitoring system for Raspberry Pi',
long_description=open("./README.md", "r").read(),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.4",
"Topic :: Home Automation",
"License :: OSI Approved :: MIT License",
],
author='Al Audet',
author_email='[email protected]',
url='http://www.linuxnorth.org/raspi-sump/',
download_url='https://github.com/alaudet/raspi-sump/releases',
license='MIT License',
packages=['raspisump'],
scripts=raspi_sump_files,
data_files=add_files,
install_requires=['hcsr04sensor']
)
if os.path.isdir(homedir):
cmd = 'chown -R pi ' + homedir
os.system(cmd)
cmd = 'chmod 600 ' + homedir + 'raspisump.conf'
os.system(cmd)