Optional pillow requirement#135
Open
QuentiumYT wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Will regen poetry lock tomorrow for CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When installing EcoIndex scrapper in a Docker image, it needs plenty of dependencies. Why? Just because pillow needs to be build from source as it is a required dependency.
Since installing
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk libharfbuzz-dev libfribidi-dev libxcb1-devtakes a while and bloat the Dockerfile, this is not so interesting.https://pillow.readthedocs.io/en/stable/installation/building-from-source.html
EcoIndex scrapper only uses pillow to generate a webp version if the user asks for it (which is probably less than 1% of all users). I suggest moving webp to an optional dependency.
Users can now install this little extra with
pip install ecoindex-scraper[webp], preventing a long install with compile time. A nice throw is shown for users that needs a webp screenshot and haven't installed the webp extra :)Thanks for your review, I needed it for a project and hopefully you can make a release soon!