python: update pip calls

This commit is contained in:
Charles Gould 2020-10-23 01:58:55 -04:00
parent db03879791
commit 3c166211c5

View File

@ -1,5 +1,5 @@
function pip_upgrade --description "Upgrade python packages" function pip_upgrade --description "Upgrade python packages"
set --local py_pkgs_outdated (pip3 list --outdated | awk 'NR > 2 {print $1}') set --local py_pkgs_outdated (python3 -m pip list --outdated | awk 'NR > 2 {print $1}')
if test (count $py_pkgs_outdated) = 0 if test (count $py_pkgs_outdated) = 0
echo "All packages up-to-date." echo "All packages up-to-date."
@ -7,7 +7,7 @@ function pip_upgrade --description "Upgrade python packages"
echo "Outdated packages: $py_pkgs_outdated" echo "Outdated packages: $py_pkgs_outdated"
if confirm if confirm
for py_pkg in $py_pkgs_outdated for py_pkg in $py_pkgs_outdated
pip3 install -U $py_pkg python3 -m pip install -U $py_pkg
end end
end end
end end