From f09e6f85969e7eaa95e815b77fc29dd307ca1a0a Mon Sep 17 00:00:00 2001 From: Stu Hood Date: Tue, 20 Jul 2021 09:40:13 -0700 Subject: [PATCH] [internal] Fix AWS CLI breaking due to Python 2 usage (cherrypick of #12364) (#12381) [ci skip-build-wheels] Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> --- build-support/bin/install_aws_cli_for_ci.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-support/bin/install_aws_cli_for_ci.sh b/build-support/bin/install_aws_cli_for_ci.sh index c6b59b1958a..fe0f4cf0e89 100755 --- a/build-support/bin/install_aws_cli_for_ci.sh +++ b/build-support/bin/install_aws_cli_for_ci.sh @@ -14,7 +14,6 @@ source build-support/common.sh AWS_CLI_ROOT="${HOME}/.aws_cli" AWS_CLI_BIN="${AWS_CLI_ROOT}/bin/aws" -# We first check if AWS CLI is already installed thanks to Travis's cache. if [[ ! -x "${AWS_CLI_BIN}" ]]; then TMPDIR=$(mktemp -d) @@ -23,7 +22,9 @@ if [[ ! -x "${AWS_CLI_BIN}" ]]; then curl --fail "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" unzip awscli-bundle.zip - ./awscli-bundle/install --install-dir "${AWS_CLI_ROOT}" + # NB: We must run this with python3 because it defaults to `python`, which refers to Python 2 in Linux GitHub + # Actions CI job and is no longer supported. + python3 ./awscli-bundle/install --install-dir "${AWS_CLI_ROOT}" popd