2020-10-23 17:59:08 +03:00
|
|
|
#!/bin/bash -e -o pipefail
|
|
|
|
|
|
2020-09-21 09:46:17 +03:00
|
|
|
source ~/utils/utils.sh
|
|
|
|
|
|
2020-09-10 14:34:08 +03:00
|
|
|
echo "Installing Python Tooling"
|
|
|
|
|
|
|
|
|
|
echo "Brew Installing Python 3"
|
2020-10-15 17:03:33 +03:00
|
|
|
# Workaround to have both 3.8 & 3.9(which required by some brew formulas) in the system, but only 3.8 is linked
|
2020-10-29 16:42:28 +03:00
|
|
|
brew install python@3.8
|
2020-10-23 11:09:22 +03:00
|
|
|
brew install python@3.9
|
2020-10-29 18:47:15 +03:00
|
|
|
brew unlink python@3.9
|
|
|
|
|
brew unlink python@3.8
|
2020-10-29 16:42:28 +03:00
|
|
|
brew link python@3.8 --force
|
2020-09-10 14:34:08 +03:00
|
|
|
|
|
|
|
|
echo "Brew Installing Python 2"
|
2020-10-07 09:29:37 +03:00
|
|
|
# Create local tap with formula due to python2 formula depreciation
|
2020-10-23 20:12:58 +03:00
|
|
|
brew tap-new --no-git local/python2
|
2020-10-23 11:09:22 +03:00
|
|
|
FORMULA_PATH=$(brew extract python@2 local/python2 | grep "Homebrew/Library/Taps")
|
|
|
|
|
brew install $FORMULA_PATH
|
2020-10-07 09:29:37 +03:00
|
|
|
|
|
|
|
|
echo "Installing pipx"
|
2020-10-07 14:58:13 +03:00
|
|
|
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin
|
|
|
|
|
export PIPX_HOME=/usr/local/opt/pipx
|
2020-10-07 09:29:37 +03:00
|
|
|
|
|
|
|
|
brew install pipx
|
|
|
|
|
|
|
|
|
|
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"
|