Files
runner-images/images/macos/scripts/build/install-python.sh
T

36 lines
980 B
Bash
Raw Normal View History

#!/bin/bash -e -o pipefail
2023-11-28 02:25:03 +01:00
################################################################################
## File: install-python.sh
## Desc: Install Python
################################################################################
source ~/utils/utils.sh
2020-09-10 14:34:08 +03:00
echo "Installing Python Tooling"
2022-02-25 10:55:47 +03:00
# Close Finder window
close_finder_window
2022-02-25 10:55:47 +03:00
# Installing latest Homebrew Python 3 to handle python3 and pip3 symlinks
echo "Brew Installing default Python 3"
brew_smart_install "python3"
# Pipx has its own Python dependency
2020-10-07 09:29:37 +03:00
echo "Installing pipx"
2024-04-05 14:52:05 +02:00
if is_Arm64; then
export PIPX_BIN_DIR="$HOME/.local/bin"
2024-05-07 12:11:46 +02:00
export PIPX_HOME="$HOME/.local/pipx"
2024-04-05 14:52:05 +02:00
else
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin
export PIPX_HOME=/usr/local/opt/pipx
fi
2020-10-07 09:29:37 +03:00
brew_smart_install "pipx"
2020-10-07 09:29:37 +03:00
echo "export PIPX_BIN_DIR=${PIPX_BIN_DIR}" >> ${HOME}/.bashrc
echo "export PIPX_HOME=${PIPX_HOME}" >> ${HOME}/.bashrc
echo 'export PATH="$PIPX_BIN_DIR:$PATH"' >> ${HOME}/.bashrc
invoke_tests "Python"