From 89d39d4a0ce56f023460bb8cfa7d2ea9d7f5caa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Armando=20Garc=C3=ADa=20Sancio?= Date: Fri, 8 Jul 2016 21:48:45 -0700 Subject: [PATCH] Conditional dependency on futures (#682) --- setup.py | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/setup.py b/setup.py index a13f05a..750fade 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -import sys from codecs import open from os import path @@ -11,24 +10,6 @@ here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: long_description = f.read() -install_requires = [ - 'gitpython>=1.0, <2.0', - 'jsonschema==2.4', # pin the exact version, jsonschema 2.5 broke py3 - 'pager>=3.3, <4.0', - 'portalocker>=0.5, <1.0', - 'prettytable>=0.7, <1.0', - 'pygments>=2.0, <3.0', - 'pypng==0.0.18', - 'pystache>=0.5, <1.0', - 'requests>=2.6, <3.0', - 'six>=1.9, <2.0', - 'toml>=0.9, <1.0', -] - -if sys.version_info[0] == 2: - install_requires.append('futures>=3.0, <4.0') - - setup( name='dcos', @@ -77,11 +58,23 @@ setup( # simple. Or you can use find_packages(). packages=find_packages(exclude=['pydoc', 'tests', 'cli', 'bin']), - # List run-time dependencies here. These will be installed by pip when - # your project is installed. For an analysis of "install_requires" vs pip's - # requirements files see: - # https://packaging.python.org/en/latest/requirements.html - install_requires=install_requires, + install_requires=[ + 'gitpython>=1.0, <2.0', + 'jsonschema==2.4', # pin the exact version, jsonschema 2.5 broke py3 + 'pager>=3.3, <4.0', + 'portalocker>=0.5, <1.0', + 'prettytable>=0.7, <1.0', + 'pygments>=2.0, <3.0', + 'pypng==0.0.18', + 'pystache>=0.5, <1.0', + 'requests>=2.6, <3.0', + 'six>=1.9, <2.0', + 'toml>=0.9, <1.0', + ], + + extras_require={ + ':python_version=="2.7"': ['futures>=3.0, <4.0'], + }, package_data={ 'dcos': [