Skip to content

Commit

Permalink
Fix googleapis#67 - Added check to install python-dev.
Browse files Browse the repository at this point in the history
  • Loading branch information
kleyow committed Apr 5, 2014
1 parent 4b56a23 commit 1dc732b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
from distutils.core import setup, find_packages


try:
import pyopenssl, pycrypto
except ImportError:
try:
import apt
cache = apt.cache.Cache()
cache['python-dev'].mark_install()
cache.commit()
except (ImportError, Exception):
print "Can't install python-dev... might be needed for other requirements"


if sys.version_info <= (2, 4):
error = 'Requires Python Version 2.5 or above... exiting.'
print >> sys.stderr, error
Expand Down

0 comments on commit 1dc732b

Please sign in to comment.