support installing default pip packages

This commit is contained in:
Lex Rivera 2018-08-13 17:55:51 +03:00
parent 05749c0f1e
commit 077fccdf9f
No known key found for this signature in database
GPG key ID: E7ED7B6B453AF56C

View file

@ -20,5 +20,19 @@ install_python() {
$(python_build_path) "$version" "$install_path"
}
install_default_eggs() {
local default_eggs="${HOME}/.default-eggs"
if [ ! -f $default_egg_packages ]; then return; fi
for name in $(cat $default_eggs); do
echo -ne "\nInstalling \e[33m${name}\e[39m egg ... "
if pip install $name > /dev/null 2>&1; then
echo -e "\e[32mSUCCESS\e[39m"
else
echo -e "\e[31mFAIL\e[39m"
fi
done
}
ensure_python_build_installed
install_python "$ASDF_INSTALL_TYPE" "$ASDF_INSTALL_VERSION" "$ASDF_INSTALL_PATH"
install_default_eggs