2020-10-23 17:59:08 +03:00
|
|
|
#!/bin/bash -e -o pipefail
|
2023-11-28 02:25:03 +01:00
|
|
|
################################################################################
|
|
|
|
|
## File: install-python.sh
|
|
|
|
|
## Desc: Install Python
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2020-09-21 09:46:17 +03:00
|
|
|
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
|
2024-08-09 11:25:15 +02:00
|
|
|
close_finder_window
|
2022-02-25 10:55:47 +03:00
|
|
|
|
2025-10-10 17:19:38 +02:00
|
|
|
# Installing latest Homebrew Python 3 to handle python3 and pip3 symlinks
|
|
|
|
|
echo "Brew Installing default Python 3"
|
2025-10-16 12:34:30 +02:00
|
|
|
brew_smart_install "python3"
|
2025-10-10 17:19:38 +02:00
|
|
|
|
|
|
|
|
# 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
|
|
|
|
2020-12-28 10:54:25 +03:00
|
|
|
brew_smart_install "pipx"
|
2020-10-07 09:29:37 +03:00
|
|
|
|
2024-01-09 14:47:31 +01: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
|
2021-01-14 00:46:44 +07:00
|
|
|
|
2021-01-22 09:26:28 +03:00
|
|
|
invoke_tests "Python"
|