Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install with setuptools aka pip #5

Merged
merged 4 commits into from
Sep 8, 2016
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the appropriate place to ask users where they'd like the weather/news from. Modifying scripts is a bit tedious in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its up to @atainter, I do like not editing config files and run everything from CLI. Perhaps someone could add something like this.

pyhton smartmirror.py --token TOKEN_KEY

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think pyhton smartmirror.py --token TOKEN_KEY would be tedious if you have to append the token every time you run it. Let's keep it as is for now.


## Demo and Build Instructions
[![Link to youtube how-to video](http://i.imgur.com/cMyaSHT.png)](https://youtu.be/fkVBAcvbrjU)
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

25 changes: 25 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/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')

# 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=['requests', 'feedparser', 'Pillow'],
packages = find_packages(),
)