-
Notifications
You must be signed in to change notification settings - Fork 384
/
setup.py
32 lines (27 loc) · 971 Bytes
/
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
#!/usr/bin/python
import os
import sys
from setuptools import setup, find_packages
# Must be ran as root or as sudo
if os.getuid() != 0:
print('ERROR: Need to run as root')
sys.exit(1)
# Install the requirements if the system does not have it installed
print('INFO: Checking and installing requirements')
os.system('! dpkg -S python-imaging-tk && apt-get -y install python-imaging-tk')
# Generate the requirements from the file for old instructions
print('INFO: Generating the requirements from requirements.txt')
packages = []
for line in open('requirements.txt', 'r'):
if not line.startswith('#'):
packages.append(line.strip())
# Run setuptools for pip
setup(
name='smartmirror',
version='1.0.0',
description='Raspberry powered mirror which can display news, weather, calendar events',
author='HackerHouse',
url='https://github.com/HackerHouseYT/Smart-Mirror',
install_requires=packages,
packages=find_packages(),
)