mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
build-chromeos.sh: Install python 3.9 for depot_tools
Kokoro uses python2 by default, which breaks repo BUG=b:226975041 TEST=./ci/kokoro/simulate.py ./ci/kokoro/build-chromeos.sh Change-Id: I2424107c76d52c4bc76cd640114c21fca00f3c44 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606968 Reviewed-by: Dmitry Torokhov <dtor@chromium.org> Tested-by: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
0c0ba1c158
commit
e40b5b8f4b
1 changed files with 13 additions and 0 deletions
|
@ -21,6 +21,12 @@ PACKAGE_LIST=(
|
||||||
'chromeos-base/crosvm'
|
'chromeos-base/crosvm'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Python script to check for at least version 3.9
|
||||||
|
VERSION_CHECK="
|
||||||
|
import sys
|
||||||
|
sys.exit(sys.version_info.major != 3 or sys.version_info.minor < 9)
|
||||||
|
"
|
||||||
|
|
||||||
setup_depot_tools() {
|
setup_depot_tools() {
|
||||||
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git \
|
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git \
|
||||||
"$DEPOT_TOOLS"
|
"$DEPOT_TOOLS"
|
||||||
|
@ -58,6 +64,13 @@ build_and_test_crosvm() {
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
# Ensure we have at least python 3.9. Kokoro requires us to use pyenv to install the required
|
||||||
|
# version.
|
||||||
|
if ! python3 -c "$VERSION_CHECK"; then
|
||||||
|
pyenv install --verbose --skip-existing 3.9.5
|
||||||
|
pyenv global 3.9.5
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$CROS_ROOT"
|
mkdir -p "$CROS_ROOT"
|
||||||
cd "$CROS_ROOT"
|
cd "$CROS_ROOT"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue