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

[Feature request] Make PIL/Pillow optional #96

Open
depau opened this issue Nov 12, 2017 · 3 comments
Open

[Feature request] Make PIL/Pillow optional #96

depau opened this issue Nov 12, 2017 · 3 comments
Labels
Milestone

Comments

@depau
Copy link

depau commented Nov 12, 2017

I'm trying to run OctoPrint on PyPy on ARM and it's being a pain because this module, which I don't want to give up, depends on Pillow and it won't run on PyPy on ARM (I opened an issue python-pillow/Pillow#2850).

I gave a look at the code and it seems to me that Pillow can be made optional. It's only used to flip the pictures from the webcam and to scale down profile pictures.

I think these features can be disabled if Pillow is not installed (original propic is used, no h/vflip feature)

What do you think?

@derpicknicker1
Copy link
Collaborator

Thats an option to think about. But when i remove pillow from the plugin requirements, it will not automatically insatll pillow for users which can use it.

@derpicknicker1 derpicknicker1 added this to the 2.0 milestone Jan 4, 2018
@depau
Copy link
Author

depau commented Jan 8, 2018

Users can simply install it manually. But I see some users might not know how to do it. Maybe we can just make an extra "fake" plugin that depends on OctoPrint-Telegram and Pillow so it gets pulled in.

@depau
Copy link
Author

depau commented Feb 25, 2018

Other alternate solutions for this issue that came to my mind in the last few days:

  • Pillow can be made optional in the code but setup.py can still depend on it. Users that don't want to use it will have to handle the unresolved dependency with pip on their own.
  • The plugin may detect the pillow ImportError and not use it.

I will try to implement one of these and send you a PR as I would like to use it in my setup, feel free not to merge it if you don't like the workarounds (I would not blame you for that, this is definitely not an OctoPrint-Telegram issue).

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

No branches or pull requests

2 participants