-
Hello, I am using poetry to manage the dependencies of my package in a pyproject.toml. Recently one of my dependencies was renamed (fuzzywuzzy became thefuzz) and I want my users to be able to use either one of them. More precisely, I would like to be able to specify the following behaviour :
How can I set the pyproject.toml to match this behaviour ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I do not think python packaging metadata today allows for this behavior, ie. "install one of". You can potentially achieve this behaviour by adding both However, the better approach might be update your project's dependency to the new package. So any existing installations will use the old package, but will not upgrade the dependency beyond |
Beta Was this translation helpful? Give feedback.
I do not think python packaging metadata today allows for this behavior, ie. "install one of". You can potentially achieve this behaviour by adding both
fuzzywuzzy
andthfuzz
as optional dependencies associated with separate extras. However, this is only really useful if both packages are going to be maintained going forward and your users get to decide what package they want to use.However, the better approach might be update your project's dependency to the new package. So any existing installations will use the old package, but will not upgrade the dependency beyond
0.18
. And any consumers of your package's new version will simply use the package.