master
Guido Longoni 2022-11-17 17:16:25 +01:00
parent 04e59eae1d
commit 25b59afb28
1 changed files with 14 additions and 10 deletions

View File

@ -30,19 +30,16 @@ function feat_add_pip() {
feat_needed curl
feat_addpacks_pip_dev
curl https://pyenv.run | bash 2>&1
{ echo "export PYENV_ROOT=\"\$HOME/.pyenv\"
export PATH=\"\$PYENV_ROOT/bin:\$PATH\"
eval \"\$(pyenv init --path)\""; cat "$HOME/.profile"; } > "$HOME/.profile.tmp"
mv "$HOME/.profile.tmp" "$HOME/.profile"
{ echo "eval \"\$(pyenv init -)\""; cat "$HOME/.bashrc"; } > "$HOME/.bashrc.tmp"
mv "$HOME/.bashrc.tmp" "$HOME/.bashrc"
. "$HOME/.profile"
. "$HOME/.bashrc"
export PATH=\"\$PYENV_ROOT/bin:\$PATH\"
eval \"\$(pyenv init -)\"" ;
cat "$HOME/.bashrc.before"; } > "$HOME/.bashrc.before.tmp"
mv "$HOME/.bashrc.before.tmp" "$HOME/.bashrc.before"
. "$HOME/.bashrc.before"
LATESTPYTHON="$(pyenv install -l | grep '^[0-9\. ]*$' | sed -ne '$s|\s*||gp')"
pyenv install "$LATESTPYTHON"
pyenv global "$LATESTPYTHON"
pip install wheel
pip install --upgrade pip
}
@ -51,7 +48,7 @@ function pip_feat_missing() {
if feat_missing "pip"; then
true
else
! python -c "import $1" >/dev/null 2>&1
! ( pip freeze | grep -q "$1=" )
fi
}
@ -70,3 +67,10 @@ function pip_feat_needed() {
fi
fi
}
function pip_feat_add_docker-compose() {
. "$(this_script_path)/pip.sh"
. "$(this_script_path)/docker.sh"
feat_needed "docker"
pip_feat_add "docker-compose"
}