jpeg support in pillow

55 views
Skip to first unread message

Andrey Novoseltsev

unread,
Apr 18, 2022, 1:41:02 PM4/18/22
to sage-devel
sage-cell got a request for jpeg support in pillow, which was explicitly removed 6 years ago, it seems, but people would like to have:

Are there any chances of doing it? My understanding is that it would require a dependency on libjpeg-dev and presumably it was not desirable at some point.

Matthias Koeppe

unread,
Apr 18, 2022, 2:52:29 PM4/18/22
to sage-devel
Does the binary wheel that would be installed by "sage -pip install pillow" provide jpeg support?

Andrey Novoseltsev

unread,
Apr 18, 2022, 4:22:50 PM4/18/22
to sage-devel
"sage -pip install pillow" does not install anything, saying that pillow is already there.

"sage -pip install -U pillow" does install a newer version with jpeg-support, but a) presumalby won't work if we happen to have the latest version already and b) has potential to break some other dependencies

So ideally jpeg would be supported by Sage directly, but if is not going to happen I'd rather keep things as is on the SageMathCell side.

Dima Pasechnik

unread,
Apr 19, 2022, 4:43:16 AM4/19/22
to sage-devel
I don't see why we can't just add a libjpeg standard spkg, and remove
that "disablility":

--- a/build/pkgs/pillow/spkg-install.in
+++ b/build/pkgs/pillow/spkg-install.in
@@ -12,7 +12,7 @@ if [ "$CONDA_PREFIX" != "" ]; then
PILLOW_BUILD_EXT="$PILLOW_BUILD_EXT --disable-platform-guessing
-I\"$CONDA_PREFIX/include\" -L\"$CONDA_PREFIX/lib\""
fi

-PILLOW_BUILD_EXT="--debug --disable-jpeg $PILLOW_BUILD_EXT"
+PILLOW_BUILD_EXT="--debug $PILLOW_BUILD_EXT"

# Note: Avoid shared libraries inside egg files, Trac #19467
eval sdh_pip_install \


I think it was added in the 1st place in order not to be bothered with
it, but it's a rather straightforward, at least on linux.

Dima
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/ad1a754f-f722-47bf-9c4d-ab3b7daaf50bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages