From: Kenneth Reitz Date: Fri, 15 Apr 2011 21:27:02 +0000 (-0400) Subject: install simplejson if python < 2.6 X-Git-Tag: v0.3.2~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8b87d416e5e76b5aab322bd38f0b1cfb9218d01;p=services%2Fpython-requests.git install simplejson if python < 2.6 --- diff --git a/setup.py b/setup.py index edf89f1..b261718 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ import requests from distutils.core import setup - + if sys.argv[-1] == "publish": os.system("python setup.py sdist upload") sys.exit() @@ -16,10 +16,11 @@ if sys.argv[-1] == "publish": if sys.argv[-1] == "test": os.system("python test_requests.py") sys.exit() - + required = [] -# if python > 2.6, require simplejson +if sys.version_info[:2] < (2,6): + required.append('simplejson') setup( name='requests',