openzim / python-scraperlib

Collection of Python code to re-use across Python-based scrapers
GNU General Public License v3.0
17 stars 16 forks source link

obsolete `libjpeg8-dev` package referenced in README.md #152

Open richterdavid opened 2 months ago

richterdavid commented 2 months ago

libjpeg8-dev referenced in the README.md is obsolete, and presumably should be replaced.

sudo apt install libmagic1 wget ffmpeg \
    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 gifsicle
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libjpeg8-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libjpeg62-turbo-dev

E: Package 'libjpeg8-dev' has no installation candidate
benoit74 commented 2 months ago

Thank you.

It is not clear to me how mandatory this lib is anyway and all others mentioned in the README (especially the "dev" headers).

Looks like Debian decided to replace this lib some time ago, but it is not 100% equivalent: https://unix.stackexchange.com/a/727617

rgaudin commented 2 months ago

Required for Pillow's image conversions. I suppose the turbo one can be used but it should be checked.

benoit74 commented 2 months ago

Required for Pillow's image conversions

Why ? Aren't we using pre-built wheels? Looking at https://pillow.readthedocs.io/en/latest/installation/basic-installation.html#basic-installation it seems that the only missing external dependency is libimagequant but scraperlib does not seem to use it

rgaudin commented 2 months ago

https://pillow.readthedocs.io/en/latest/installation/building-from-source.html#external-libraries

Screenshot 2024-04-19 at 08 44 35
benoit74 commented 2 months ago

This is needed only for building from source, are we doing this?

rgaudin commented 2 months ago

If there are matching wheels, we're not but with pip you can't control that for everybody (it's a lib). We should definitely update README to include required-only dependencies or even specify which feature would fail for missing dependency.

benoit74 commented 2 months ago

Agreed, in most situations a new developer on scraperlib probably does not need most of the mentioned requirements since he will probably be able to use the wheels. And even if he doesn't, he might well not be blocked in his development because not concerned by this part of the codebase.