zen_otter
zen_otter

Reputation: 51

Poetry: how to reinstall a wheel with the same name

I am using poetry to manage the dependencies of my python project and I am really a fan of it! At the moment one of the dependencies of my project is the wheel coming from an internal library, since it is internal this has then to be installed from a wheel. Lately I did some changes on the library and I wanted to test them on my project, I then produced a wheel and then moved the wheel in the location where the pyproject.toml was expecting it to be. I then executed a poetry install but I noticed later that the code inside my venv was still the same as the previous one. In order to update the code corresponding to the new wheel I need to remove the reference to that package in the pyproject.toml file, then update, then read the wheel to the pyproject.toml file and then update again.

Is there a way to force reinstall the packages on poetry? I tried to look it up but I did not find any information about it. In other case, is someone else facing more or less the same workflow using poetry and can suggest a better way to handle it?

Thanks to everyone in advance

Upvotes: 5

Views: 3606

Answers (1)

Bill E
Bill E

Reputation: 31

I know it's an old question but I've been looking for the same thing. Best way I found is to have a script in the package folder

poetry remove <package-name> && poetry add <path_to_wheel>

Upvotes: 3

Related Questions