Install futures package only on Python 2

pull/15362/head
Mehrdad Afshari 7 years ago committed by Mehrdad Afshari
parent dcd5aefba3
commit ac6aaa3f0b
  1. 1
      requirements.txt
  2. 5
      src/python/grpcio_tests/setup.py
  3. 6
      tools/run_tests/artifacts/build_artifact_python.sh
  4. 8
      tools/run_tests/helper_scripts/build_python.sh

@ -2,7 +2,6 @@
coverage>=4.0
cython>=0.27
enum34>=1.0.4
futures>=2.2.0
protobuf>=3.5.0.post1
six>=1.10
wheel>=0.29

@ -37,13 +37,16 @@ PACKAGE_DIRECTORIES = {
}
INSTALL_REQUIRES = (
'coverage>=4.0', 'enum34>=1.0.4', 'futures>=2.2.0',
'coverage>=4.0', 'enum34>=1.0.4',
'grpcio>={version}'.format(version=grpc_version.VERSION),
'grpcio-tools>={version}'.format(version=grpc_version.VERSION),
'grpcio-health-checking>={version}'.format(version=grpc_version.VERSION),
'oauth2client>=1.4.7', 'protobuf>=3.5.2.post1', 'six>=1.10',
'google-auth>=1.0.0', 'requests>=2.14.2')
if not PY3:
INSTALL_REQUIRES += ('futures>=2.2.0',)
COMMAND_CLASS = {
# Run `preprocess` *before* doing any packaging!
'preprocess': commands.GatherProto,

@ -90,6 +90,12 @@ fi
if [ "$GRPC_BUILD_GRPCIO_TOOLS_DEPENDENTS" != "" ]
then
"${PIP}" install -rrequirements.txt
if [ "$("$PYTHON" -c "import sys; print(sys.version_info[0])")" == "2" ]
then
"${PIP}" install futures>=2.2.0
fi
"${PIP}" install grpcio --no-index --find-links "file://$ARTIFACT_DIR/"
"${PIP}" install grpcio-tools --no-index --find-links "file://$ARTIFACT_DIR/"

@ -157,7 +157,13 @@ esac
$VENV_PYTHON -m pip install --upgrade pip==10.0.1
$VENV_PYTHON -m pip install setuptools
$VENV_PYTHON -m pip install cython
$VENV_PYTHON -m pip install six enum34 protobuf futures
$VENV_PYTHON -m pip install six enum34 protobuf
if [ "$("$VENV_PYTHON" -c "import sys; print(sys.version_info[0])")" == "2" ]
then
$VENV_PYTHON -m pip install futures
fi
pip_install_dir "$ROOT"
$VENV_PYTHON "$ROOT/tools/distrib/python/make_grpcio_tools.py"

Loading…
Cancel
Save