Merge pull request #22561 from gnossen/python35_test
Add 3.5 to default interpreters to be tested.
This commit is contained in:
commit
3928f2fa69
|
|
@ -16,7 +16,11 @@
|
|||
|
||||
<%include file="../../python_stretch.include"/>
|
||||
<%include file="../../compile_python_36.include"/>
|
||||
|
||||
<%include file="../../compile_python_38.include"/>
|
||||
|
||||
RUN apt-get update && apt-get install -y python3.5 python3.5-dev
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.5
|
||||
|
||||
RUN apt-get update && apt-get -t buster install -y python3.7 python3-all-dev
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7
|
||||
|
||||
|
|
|
|||
|
|
@ -84,6 +84,29 @@ RUN cd /tmp && \
|
|||
RUN python3.6 -m ensurepip && \
|
||||
python3.6 -m pip install coverage
|
||||
|
||||
#=================
|
||||
# Compile CPython 3.8.0b4 from source
|
||||
|
||||
RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev
|
||||
RUN apt-get update && apt-get install -y jq build-essential libffi-dev
|
||||
|
||||
RUN cd /tmp && \
|
||||
wget -q https://www.python.org/ftp/python/3.8.0/Python-3.8.0b4.tgz && \
|
||||
tar xzvf Python-3.8.0b4.tgz && \
|
||||
cd Python-3.8.0b4 && \
|
||||
./configure && \
|
||||
make install
|
||||
|
||||
RUN cd /tmp && \
|
||||
echo "b8f4f897df967014ddb42033b90c3058 Python-3.8.0b4.tgz" > checksum.md5 && \
|
||||
md5sum -c checksum.md5
|
||||
|
||||
RUN python3.8 -m ensurepip && \
|
||||
python3.8 -m pip install coverage
|
||||
|
||||
|
||||
RUN apt-get update && apt-get install -y python3.5 python3.5-dev
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.5
|
||||
|
||||
RUN apt-get update && apt-get -t buster install -y python3.7 python3-all-dev
|
||||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7
|
||||
|
|
|
|||
|
|
@ -165,24 +165,33 @@ pip_install_dir() {
|
|||
cd "$PWD"
|
||||
}
|
||||
|
||||
# On library/version/platforms combo that do not have a binary
|
||||
# published, we may end up building a dependency from source. In that
|
||||
# case, several of our build environment variables may disrupt the
|
||||
# third-party build process. This function pipes through only the
|
||||
# minimal environment necessary.
|
||||
pip_install() {
|
||||
/usr/bin/env -i PATH="$PATH" "$VENV_PYTHON" -m pip install "$@"
|
||||
}
|
||||
|
||||
case "$VENV" in
|
||||
*py36_gevent*)
|
||||
# TODO(https://github.com/grpc/grpc/issues/15411) unpin this
|
||||
$VENV_PYTHON -m pip install gevent==1.3.b1
|
||||
pip_install gevent==1.3.b1
|
||||
;;
|
||||
*gevent*)
|
||||
$VENV_PYTHON -m pip install -U gevent
|
||||
pip_install -U gevent
|
||||
;;
|
||||
esac
|
||||
|
||||
$VENV_PYTHON -m pip install --upgrade pip==19.3.1
|
||||
$VENV_PYTHON -m pip install --upgrade setuptools
|
||||
$VENV_PYTHON -m pip install --upgrade cython
|
||||
$VENV_PYTHON -m pip install --upgrade six enum34 protobuf
|
||||
pip_install --upgrade pip==19.3.1
|
||||
pip_install --upgrade setuptools
|
||||
pip_install --upgrade cython
|
||||
pip_install --upgrade six enum34 protobuf
|
||||
|
||||
if [ "$("$VENV_PYTHON" -c "import sys; print(sys.version_info[0])")" == "2" ]
|
||||
then
|
||||
$VENV_PYTHON -m pip install futures
|
||||
pip_install futures
|
||||
fi
|
||||
|
||||
pip_install_dir "$ROOT"
|
||||
|
|
@ -214,9 +223,9 @@ pip_install_dir "$ROOT/src/python/grpcio_status"
|
|||
pip_install_dir "$ROOT/src/python/grpcio_testing"
|
||||
|
||||
# Build/install tests
|
||||
$VENV_PYTHON -m pip install coverage==4.4 oauth2client==4.1.0 \
|
||||
google-auth==1.0.0 requests==2.14.2 \
|
||||
googleapis-common-protos==1.5.5
|
||||
pip_install coverage==4.4 oauth2client==4.1.0 \
|
||||
google-auth==1.0.0 requests==2.14.2 \
|
||||
googleapis-common-protos==1.5.5
|
||||
$VENV_PYTHON "$ROOT/src/python/grpcio_tests/setup.py" preprocess
|
||||
$VENV_PYTHON "$ROOT/src/python/grpcio_tests/setup.py" build_package_protos
|
||||
pip_install_dir "$ROOT/src/python/grpcio_tests"
|
||||
|
|
|
|||
|
|
@ -866,9 +866,19 @@ class PythonLanguage(object):
|
|||
else:
|
||||
if args.iomgr_platform == 'asyncio':
|
||||
return (python36_config,)
|
||||
elif os.uname()[0] == 'Darwin':
|
||||
# NOTE(rbellevi): Testing takes significantly longer on
|
||||
# MacOS, so we restrict the number of interpreter versions
|
||||
# tested.
|
||||
return (
|
||||
python27_config,
|
||||
python36_config,
|
||||
python37_config,
|
||||
)
|
||||
else:
|
||||
return (
|
||||
python27_config,
|
||||
python35_config,
|
||||
python36_config,
|
||||
python37_config,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue