Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use extra_requires for the backend clients pip #44

Closed
kalyanaramansanthanam opened this issue Aug 2, 2020 · 4 comments · Fixed by #59
Closed

Use extra_requires for the backend clients pip #44

kalyanaramansanthanam opened this issue Aug 2, 2020 · 4 comments · Fixed by #59

Comments

@kalyanaramansanthanam
Copy link

Suggestion: Instead of requiring all 3 backend clients to be installed, please allow an option to only install the backend being used.

Relevant: https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies

@davidandreoletti
Copy link

davidandreoletti commented Jul 14, 2022

@vaidik (ping)

Problem

#45 and #44 relate to the same issue: library users may not have/need all 3 supported backend at once and related libraries installed yet the package requires them all.

As @kalyanaramansanthanam described above Python offers a solution for optional dependencies. The link above seems not to point to the relevant section anymore but here is a very short summary: https://stackoverflow.com/a/45043494

Additionally, only XXXLock classes whose dependency is available at runtime should be declared (nice to have) to avoid package import failure. This issue will become more problematic as the number of backends increases.

Workaround

macOS:
brew install libmemcached
Ubuntu:
apt-get install libmemcached-dev

PS: This is a fantastic library!

@judahrand Are you the new maintainer now ?

@judahrand
Copy link
Collaborator

@davidandreoletti I'm certainly planning on trying to get this project modernized and merge in some fixes improvements, etc.

If you're keen to contribute this change/feature please feel feel to open a PR and I'll do my best to support!

@davidandreoletti
Copy link

I have limited bandwidth for OSS projects and ended up not using this package. Another time perhaps :-)

@judahrand
Copy link
Collaborator

This should now work. Just need to actually release it -- in the meantime you could install from the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants