-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from ewized/setuptools
Install with setuptools aka pip
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | ||
) |