Skip to content

Commit

Permalink
Generate the requirements from the file
Browse files Browse the repository at this point in the history
  • Loading branch information
ewized committed Sep 8, 2016
1 parent 88eca9a commit 5950876
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
requests
feedparser
Pillow
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@
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=['requests', 'feedparser', 'Pillow'],
packages = find_packages(),
install_requires=packages,
packages=find_packages(),
)

0 comments on commit 5950876

Please sign in to comment.