import os
from setuptools import setup

# Utility function to read the README file.
# Used for the long_description.  It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
  return open(os.path.join(os.path.dirname(__file__), fname)).read()

def generateDeps(fname):
  return open(os.path.join(os.path.dirname(__file__), fname)).readlines()

setup(
  name = "firmata.py",
  version = "0.1",
  author = "Silas Snider",
  author_email = "swsnider@gmail.com",
  description = ("An API wrapper for the firmata wire protocol."),
  license = "MIT",
  keywords = "firmata arduino serial",
  url = "https://github.com/swsnider/firmata.py",
  packages=['firmata', 'tests'],
  long_description=read('README.md'),
  classifiers=[
    "Development Status :: 3 - Alpha",
    "Topic :: Utilities",
    "License :: OSI Approved :: MIT License",
  ],
  install_requires=generateDeps('requirements.txt')
)

@@ -266,32 +266,41 @@
 ef read(fname):%0A
+  try:%0A  
   return open(os
@@ -356,107 +356,31 @@
 d()%0A
-%0Adef generateDeps(fname):%0A  return open(os.path.join(os.path.dirname(__file__), fname)).readlines()
+  except:%0A    return ''
 %0A%0Ase
@@ -407,16 +407,16 @@
 ta.py%22,%0A
-
   versio
@@ -423,16 +423,18 @@
 n = %220.1
+.1
 %22,%0A  aut
@@ -895,39 +895,49 @@
 res=
-generateDeps('requirements.txt')
+%5B%0A    %22pyserial%3E=2.6%22,%0A    %22unittest2%22%0A  %5D
 %0A)%0A

Fix setup.py to work when installing from Cheeseshop