Skip to content

Optional pillow requirement#135

Open
QuentiumYT wants to merge 1 commit into
cnumr:mainfrom
Quentium-Forks:optional-pillow
Open

Optional pillow requirement#135
QuentiumYT wants to merge 1 commit into
cnumr:mainfrom
Quentium-Forks:optional-pillow

Conversation

@QuentiumYT
Copy link
Copy Markdown
Contributor

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-dev takes 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!

@QuentiumYT
Copy link
Copy Markdown
Contributor Author

Will regen poetry lock tomorrow for CI

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 this pull request may close these issues.

1 participant