Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(query): build image limit python 3.12.2 #15501

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 20 additions & 28 deletions scripts/setup/dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,35 +131,27 @@ function install_ziglang {
}

function install_python3 {
PACKAGE_MANAGER=$1

echo "==> installing python3..."
echo "==> installing python3 via pyenv..."
curl https://pyenv.run | bash

# Check if pyenv is already initialized in the profile
if ! command -v pyenv >/dev/null; then
# Add PYENV_ROOT to the profile
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> $HOME/.profile
# Check if pyenv is in the PATH
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> $HOME/.profile
# Initialize pyenv in the profile
echo 'eval "$(pyenv init -)"' >> ~/.profile
echo "pyenv environment variables have been added to ~/.profile"
else
echo "pyenv is already set in the environment variables."
fi

case "$PACKAGE_MANAGER" in
apt-get)
install_pkg python3-all-dev "$PACKAGE_MANAGER"
install_pkg python3-setuptools "$PACKAGE_MANAGER"
install_pkg python3-pip "$PACKAGE_MANAGER"
install_pkg libcairo2-dev "$PACKAGE_MANAGER"
;;
apk)
install_pkg python3-dev "$PACKAGE_MANAGER"
install_pkg py3-pip "$PACKAGE_MANAGER"
install_pkg libffi-dev "$PACKAGE_MANAGER"
;;
brew | pacman)
install_pkg python3 "$PACKAGE_MANAGER"
install_pkg cairo "$PACKAGE_MANAGER"
;;
yum | dnf)
install_pkg python3-devel "$PACKAGE_MANAGER"
install_pkg cairo-devel "$PACKAGE_MANAGER"
;;
*)
echo "Unable to install python3 with package manager: $PACKAGE_MANAGER"
exit 1
;;
esac
# Source the profile to apply changes to the current session
source $HOME/.profile
# install python3.12
pyenv install 3.12.2
pyenv global 3.12.2
}

function install_openssl {
Expand Down
Loading