Files
runner-images/images/macos/provision/core/python.sh
Mikhail Timofeev 0d46520ccf [macOS] Fail builds on errors during the image generation (#1756)
* set -e and fix all the scripts

* add source utils to finalize_vm script

* change xcode version in postbuild script

* fix for softwareupdates and for xcode version
2020-10-23 17:59:08 +03:00

20 lines
704 B
Bash
Executable File

#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
echo "Installing Python Tooling"
echo "Brew Installing Python 3"
# Workaround to have both 3.8 & 3.9(which required by some brew formulas) in the system, but only 3.8 is linked
/usr/local/bin/brew install python@3.8
/usr/local/bin/brew install python@3.9
/usr/local/bin/brew unlink python@3.9
/usr/local/bin/brew unlink python@3.8
/usr/local/bin/brew link python@3.8
echo "Brew Installing Python 2"
# Create local tap with formula due to python2 formula depreciation
/usr/local/bin/brew tap-new local/python2
FORMULA_PATH=$(/usr/local/bin/brew extract python@2 local/python2 | grep "Homebrew/Library/Taps")
/usr/local/bin/brew install $FORMULA_PATH