Merge pull request #131 from mikeroll/requirements
Support upgrades and requirements.txt syntax for default packages
This commit is contained in:
commit
57ef777023
1 changed files with 4 additions and 11 deletions
15
bin/install
15
bin/install
|
@ -33,17 +33,10 @@ install_python() {
|
||||||
install_default_python_packages() {
|
install_default_python_packages() {
|
||||||
local packages_file="${ASDF_PYTHON_DEFAULT_PACKAGES_FILE:-$HOME/.default-python-packages}"
|
local packages_file="${ASDF_PYTHON_DEFAULT_PACKAGES_FILE:-$HOME/.default-python-packages}"
|
||||||
|
|
||||||
if [ ! -f "$packages_file" ]; then return; fi
|
if [ -f "$packages_file" ]; then
|
||||||
|
echo -ne "\nInstalling default python packages..."
|
||||||
while read -r name; do
|
PATH="$ASDF_INSTALL_PATH/bin:$PATH" pip install -U -r "$packages_file"
|
||||||
echo -ne "\nInstalling \033[33m${name}\033[39m python package... "
|
fi
|
||||||
PATH="$ASDF_INSTALL_PATH/bin:$PATH" pip install "$name" > /dev/null 2>&1 && rc=$? || rc=$?
|
|
||||||
if [[ $rc -eq 0 ]]; then
|
|
||||||
echo -e "\033[32mSUCCESS\033[39m"
|
|
||||||
else
|
|
||||||
echo -e "\033[31mFAIL\033[39m"
|
|
||||||
fi
|
|
||||||
done < "$packages_file"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ensure_python_build_installed
|
ensure_python_build_installed
|
||||||
|
|
Loading…
Reference in a new issue