From 95e7c53f5c4054c5bc3486b87c00a11524f11145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Armando=20Garc=C3=ADa=20Sancio?= Date: Fri, 8 Jul 2016 17:18:39 -0700 Subject: [PATCH] Add dependency for concurrent.futures (#680) Conditionally install futures in py27 --- bin/env.sh | 2 +- cli/bin/env.sh | 2 +- cli/setup.py | 2 +- setup.py | 34 ++++++++++++++++++++-------------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/bin/env.sh b/bin/env.sh index 204502d..9b1a8e1 100755 --- a/bin/env.sh +++ b/bin/env.sh @@ -4,7 +4,7 @@ BASEDIR=`dirname $0`/.. if [ ! -d "$BASEDIR/env" ]; then - python3 -m venv $BASEDIR/env + virtualenv -p python3 -q $BASEDIR/env --prompt='(dcos) ' echo "Virtualenv created." if [ -f "$BASEDIR/env/bin/activate" ]; then diff --git a/cli/bin/env.sh b/cli/bin/env.sh index 204502d..04be27d 100755 --- a/cli/bin/env.sh +++ b/cli/bin/env.sh @@ -4,7 +4,7 @@ BASEDIR=`dirname $0`/.. if [ ! -d "$BASEDIR/env" ]; then - python3 -m venv $BASEDIR/env + virtualenv -p python3 -q $BASEDIR/env --prompt='(dcoscli) ' echo "Virtualenv created." if [ -f "$BASEDIR/env/bin/activate" ]; then diff --git a/cli/setup.py b/cli/setup.py index ba96b83..7006fde 100644 --- a/cli/setup.py +++ b/cli/setup.py @@ -66,9 +66,9 @@ setup( 'dcos=={}'.format(dcoscli.version), 'docopt>=0.6, <1.0', 'pkginfo==1.2.1', + 'rollbar>=0.9, <1.0', 'toml>=0.9, <1.0', 'virtualenv>=13.0, <16.0', - 'rollbar>=0.9, <1.0' ], # If there are data files included in your packages that need to be diff --git a/setup.py b/setup.py index 8fce6d0..a13f05a 100755 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +import sys from codecs import open from os import path @@ -10,6 +11,24 @@ 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', @@ -62,20 +81,7 @@ setup( # 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=[ - 'futures>=3.0, <4.0', - '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', - ], + install_requires=install_requires, package_data={ 'dcos': [