From a2c1c4f89a5e220e7b39420ebea33623c7c72804 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Mon, 4 May 2020 15:52:28 -0700 Subject: [PATCH] fix(python): use python installed by pyenv for bazel (#520) --- .kokoro-autosynth/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.kokoro-autosynth/build.sh b/.kokoro-autosynth/build.sh index 091539efe..3cc2e6145 100644 --- a/.kokoro-autosynth/build.sh +++ b/.kokoro-autosynth/build.sh @@ -32,6 +32,10 @@ cd /home/kbuilder/.pyenv/plugins/python-build/../.. && git pull && cd - pyenv install 3.6.9 pyenv global 3.6.9 +# use python installed by pyenv and use python3.6 specific set of dependencies +echo "build --extra_toolchains=@gapic_generator_python//:pyenv3_toolchain --define=gapic_gen_python=3.6" > $HOME/.bazelrc +echo "test --extra_toolchains=@gapic_generator_python//:pyenv3_toolchain --define=gapic_gen_python=3.6" >> $HOME/.bazelrc + # Disable buffering, so that the logs stream through. export PYTHONUNBUFFERED=1