# -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do
# so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

execfile('zerorpc/version.py')

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup


setup(
    name='zerorpc',
    version=__version__,
    description='zerorpc is a flexible RPC based on zeromq.',
    author=__author__,
    url='https://github.com/dotcloud/zerorpc-python',
    packages=['zerorpc'],
    install_requires=[
            'argparse',
            'gevent',
            'msgpack-python',
            'pyzmq>=2.2.0.1',
    ],
    tests_require=['nose'],
    test_suite='nose.collector',
    zip_safe=False,
    scripts=[
            'bin/zerorpc'
        ],
    license='MIT',
    classifiers=(
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python',
    ),
)

@@ -1255,16 +1255,28 @@
 on.py')%0A
+import sys%0A%0A
 %0Atry:%0A  
@@ -1365,16 +1365,176 @@
 setup%0A%0A%0A
+requirements = %5B%0A        'gevent',%0A        'msgpack-python',%0A        'pyzmq%3E=2.2.0.1'%0A%5D%0Aif sys.version_info %3C (2, 7):%0A        requirements.append('argparse')%0A%0A%0A
 setup(%0A 
@@ -1767,121 +1767,20 @@
 res=
-%5B%0A            'argparse',%0A            'gevent',%0A            'msgpack-python',%0A            'pyzmq%3E=2.2.0.1',%0A    %5D
+requirements
 ,%0A  

Add argparse as install requirement only when Python < 2.7