#!/bin/bash -e -o pipefail source ~/utils/utils.sh echo "Installing Python Tooling" if is_Monterey || is_BigSur; then echo "Install latest Python 2" Python2Url="https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg" download_with_retries $Python2Url "/tmp" "python2.pkg" sudo installer -showChoiceChangesXML -pkg /tmp/python2.pkg -target / > /tmp/python2_choices.xml # To avoid symlink conflicts, remove tools installation in /usr/local/bin using installer choices xmllint --shell /tmp/python2_choices.xml <> "${HOME}/.bashrc" echo "export PIPX_HOME=${PIPX_HOME}" >> "${HOME}/.bashrc" echo 'export PATH="$PIPX_BIN_DIR:$PATH"' >> "${HOME}/.bashrc" invoke_tests "Python"