diff --git a/kokoro/macos/prepare_build_macos_rc b/kokoro/macos/prepare_build_macos_rc index 18ce60b17f..830e7eee67 100755 --- a/kokoro/macos/prepare_build_macos_rc +++ b/kokoro/macos/prepare_build_macos_rc @@ -66,7 +66,7 @@ fi # Install Tox if [[ "${KOKORO_INSTALL_TOX:-}" == "yes" ]] ; then - sudo pip install tox==2.4.1 + sudo python3 -m pip install --upgrade pip tox fi ## diff --git a/kokoro/release/python/macos/config.sh b/kokoro/release/python/macos/config.sh index 741988a6b5..1b0a302e4c 100644 --- a/kokoro/release/python/macos/config.sh +++ b/kokoro/release/python/macos/config.sh @@ -1,6 +1,25 @@ # Define custom utilities # Test for OSX with [ -n "$IS_OSX" ] +function remove_travis_ve_pip { + # Removing the system virtualenv or pip can be very problematic for + # macOS on Kokoro, so just leave them be. + :; +} + +function install_pip { + check_python + PIP_CMD="sudo $PYTHON_EXE -m pip${pip_args:+ $pip_args}" + $PIP_CMD install --upgrade pip +} + +function install_virtualenv { + check_python + check_pip + $PIP_CMD install --upgrade virtualenv + VIRTUALENV_CMD="$PYTHON_EXE -m virtualenv" +} + function pre_build { # Any stuff that you need to do before you start building the wheels # Runs in the root directory of this repository. diff --git a/tests.sh b/tests.sh index 52b9cf127b..ca787ca69a 100755 --- a/tests.sh +++ b/tests.sh @@ -314,7 +314,7 @@ build_python() { if [ $(uname -s) == "Linux" ]; then envlist=py\{27,33,34,35,36\}-python else - envlist=py27-python + envlist=py\{27,36\}-python fi tox -e $envlist cd .. @@ -364,7 +364,7 @@ build_python_cpp() { if [ $(uname -s) == "Linux" ]; then envlist=py\{27,33,34,35,36\}-cpp else - envlist=py27-cpp + envlist=py\{27,36\}-cpp fi tox -e $envlist cd ..