2 # This script downloads and installs awscli from the packages mirrored in our
3 # own S3 bucket. This follows the recommendations at:
5 # https://packaging.python.org/guides/index-mirrors-and-caches/#caching-with-pip
7 # To create a new mirrored copy you can run the command:
11 # Before compressing please make sure all the wheels end with `-none-any.whl`.
12 # If that's not the case you'll need to remove the non-cross-platform ones and
13 # replace them with the .tar.gz downloaded from https://pypi.org. Also make
14 # sure it's possible to call this script with both Python 2 and Python 3.
19 MIRROR="https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/2019-07-27-awscli.tar"
20 DEPS_DIR="/tmp/awscli-deps"
24 if [[ "${AGENT_OS}" == "Linux" ]]; then
28 sudo apt-get install -y python3-setuptools
29 echo "##vso[task.prependpath]$HOME/.local/bin"
32 mkdir -p "${DEPS_DIR}"
33 curl "${MIRROR}" | tar xf - -C "${DEPS_DIR}"
34 "${pip}" install ${pipflags} --no-index "--find-links=${DEPS_DIR}" awscli