From bcd9d3d7ae31906f7014ec10407a8ae9e21b5466 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Wed, 2 Mar 2016 15:20:19 -0800 Subject: [PATCH] Adding grpcio to setup.py as an extra. grpcio can only be installed with Python 2.7, so the py27 tox environment is the only one that doesn't need to run without mocks. --- setup.py | 3 ++- tox.ini | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fde5845cad25..a3d5fe54809e 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ import os - from setuptools import setup from setuptools import find_packages @@ -19,6 +18,7 @@ 'pyOpenSSL', 'six', ] +GRPC_EXTRAS = ['grpcio >= 0.13.0'] setup( name='gcloud', @@ -35,6 +35,7 @@ include_package_data=True, zip_safe=False, install_requires=REQUIREMENTS, + extras_require={'grpc': GRPC_EXTRAS}, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', diff --git a/tox.ini b/tox.ini index 563571df4cbe..d1ef5b69d923 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,15 @@ covercmd = --cover-branches \ --nocapture +[testenv:py27] +basepython = + python2.7 +deps = + {[testenv]deps} + grpcio >= 0.13.0 +setenv = + PYTHONPATH = + [testenv:cover] basepython = python2.7