Skip to content

Commit

Permalink
Merge pull request #5 from ewized/setuptools
Browse files Browse the repository at this point in the history
Install with setuptools aka pip
  • Loading branch information
atainter authored Sep 8, 2016
2 parents 6643d7d + 5950876 commit bc8a850
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Smart-Mirror
Raspberry powered mirror which can display the news, weather, and time.

## Installation and Updating
Installation is simple as running the following command.

> sudo pip install git+https://github.com/HackerHouseYT/Smart-Mirror.git
## Running
To run the application run the following command in this folder
> python smartmirror.py
## Demo and Build Instructions
[![Link to youtube how-to video](http://i.imgur.com/cMyaSHT.png)](https://youtu.be/fkVBAcvbrjU)
32 changes: 32 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,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(),
)

0 comments on commit bc8a850

Please sign in to comment.