mitsuhiko / pipsi

pip script installer
Other
2k stars 133 forks source link

Upgrade all packages at once #168

Open lofidevops opened 6 years ago

lofidevops commented 6 years ago

User story: I am a Pythonista with multiple packages installed via pipsi. I want to upgrade all my packages at once, so that I don't forget any of them and don't have to type them out one-by-one.

Current method:

pipsi list # lists all packages
pipsi upgrade package1
pipsi upgrade package2
...

Suggested solution:

A new command pipsi upgrade --all

Workaround:

pipsi list | grep 'Package ' | cut -d\" -f2 | xargs -n1 pipsi upgrade

(Separating this out from https://github.com/mitsuhiko/pipsi/issues/16 which includes additional feature requests and queries. This feature request is simply to replace one-by-one upgrades.)

igalic commented 6 years ago

so, my current work around failed horribly… because of the way the path is determined:

cd ~/.local/venvs
for pkg in *
    pipsi upgrade $pkg
end

Usage: pipsi upgrade [OPTIONS] PACKAGE

Error: asciinema does not appear to be a local Python package.

this, however, works:

cd ~
for pkg in ~/.local/venvs/*
    pipsi upgrade (basename $pkg)
end
cs01 commented 5 years ago

I recently started a project called pipx that combines pipsi's functionality with npx's. It has the command pipx upgrade-all. Would love to hear what you think! https://github.com/cs01/pipx