Permalink
Browse files

setup.py dependency hack

  • Loading branch information...
bboe committed Mar 23, 2012
1 parent c3ccd90 commit cba27436943ff31e40bfe0b59336aec5fb95ca55
Showing with 15 additions and 2 deletions.
  1. +15 −2 setup.py
View
@@ -3,8 +3,20 @@
except ImportError:
from distutils.core import setup
-from reddit import VERSION
+try:
+ import six
+except ImportError:
+ # HACK so we can import the VERSION from reddit without needing six first
+ import sys
+ class HackObj(object):
+ def __call__(*args):
+ return HackObj()
+ def __getattr__(*args):
+ return HackObj()
+ sys.modules['six'] = HackObj()
+ sys.modules['six.moves'] = HackObj()
+from reddit import VERSION
setup(
name='reddit',
@@ -30,4 +42,5 @@
license='GPLv3',
keywords=['api', 'reddit'],
packages=['reddit'],
- package_data={'reddit': ['*.cfg']})
+ package_data={'reddit': ['*.cfg']},
+ install_requires=['six'])

0 comments on commit cba2743

Please sign in to comment.