rye icon indicating copy to clipboard operation
rye copied to clipboard

How should we go about updating the global tools applications?

Open Zander-1024 opened this issue 1 year ago • 8 comments

We can use rye install ... to install some python applications, but how to update it? Currently it seems the only option is to uninstall and then reinstall. pip can use --upgrade to update the application. Can we also add another parameter to update the application?

Zander-1024 avatar Dec 03 '23 08:12 Zander-1024

The functionality of rye install is based on rye add, so there should be an update mechanism such as adding the --upgrade flag, so that the project's virtual environment can update the package (as well as synchronize the update of the pyproject.toml file), and the tools can be updated as well.

ischaojie avatar Dec 03 '23 10:12 ischaojie

Also is there a need for a command like --upgrade-all to update all the tools?

ischaojie avatar Dec 03 '23 10:12 ischaojie

You can rye install the-tool --force to update.

catwell avatar Dec 08 '23 14:12 catwell

You can rye install the-tool --force to update.您可以 rye install the-tool --force 进行更新。

you are right, but it doesn't feel very graceful.

Zander-1024 avatar Dec 09 '23 13:12 Zander-1024

It's not very graceful, but it works for now. I think I should add this to the docs until a better command exists.

mitsuhiko avatar Dec 16 '23 20:12 mitsuhiko

related: https://github.com/mitsuhiko/rye/discussions/518

ischaojie avatar Dec 22 '23 07:12 ischaojie

The main problem with “rye install the-tool --force” right now is that it doesn’t work great when run automatically, e.g. as part of a script to update various global packages throughout the system.

I wrote a bit about that here: https://github.com/mitsuhiko/rye/discussions/496#discussion-5838264

But the short version is that you lose any pinned python version for a tool, and it always reinstalls the tool even if the version hasn’t changed, so it gets slow when you have a lot of them

dimfeld avatar Feb 07 '24 08:02 dimfeld

If uv is used to facilitate this, perhaps uv tool upgrade could be exposed as rye tools upgrade? Related uv addition within the past couple of days: https://github.com/astral-sh/uv/commit/cbc3274848dbbf8420b475232579db962a863811 (new as of uv 0.2.35)

JonZeolla avatar Aug 10 '24 15:08 JonZeolla