FS#67324 - [python-matplotlib] python-pillow replaces libpng

Attached to Project: Community Packages
Opened by Atomic (Atomic) - Sunday, 19 July 2020, 11:13 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 26 July 2020, 05:57 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Bruno Pagani (ArchangeGabriel)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

In version 3.3.0 python-pillow replaces libpng as dependency.

Package 3.3.0-1 :

$ cat test.py
import matplotlib.pyplot

$ python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
import matplotlib.pyplot
File "/usr/lib/python3.8/site-packages/matplotlib/pyplot.py", line 36, in <module>
import matplotlib.colorbar
File "/usr/lib/python3.8/site-packages/matplotlib/colorbar.py", line 44, in <module>
import matplotlib.contour as contour
File "/usr/lib/python3.8/site-packages/matplotlib/contour.py", line 17, in <module>
import matplotlib.text as text
File "/usr/lib/python3.8/site-packages/matplotlib/text.py", line 16, in <module>
from .textpath import TextPath # Unused, but imported by others.
File "/usr/lib/python3.8/site-packages/matplotlib/textpath.py", line 11, in <module>
from matplotlib.mathtext import MathTextParser
File "/usr/lib/python3.8/site-packages/matplotlib/mathtext.py", line 27, in <module>
from PIL import Image
ModuleNotFoundError: No module named 'PIL'


Suggestion:

Make python-pillow a dependency and drop it from makedepends and optdepends.

Drop libpng from depends.
This task depends upon

Closed by  Felix Yan (felixonmars)
Sunday, 26 July 2020, 05:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  3.3.0-2
Comment by Atomic (Atomic) - Saturday, 25 July 2020, 13:46 GMT
Some additional information below about setup.py which removed libpng for pillow. The commit is included in the v3.3.0 tag. setup.py explicitly lists pillow as a dependency.


$ git log -G'pillow' setup.py
[...]
commit 370e9a2d5d9e637abc90b3270d368642c69f66c6
[...]


$ git tag --contains 370e9a2d5d9e637abc90b3270d368642c69f66c6
v3.3.0
v3.3.0rc1


$ git show '370e9a2d5d9e637abc90b3270d368642c69f66c6' setup.py
[...]
diff --git a/setup.py b/setup.py
index 760e84af1..4de989563 100644
--- a/setup.py
+++ b/setup.py
@@ -58,7 +58,6 @@ mpl_packages = [
setupext.LibAgg(),
setupext.FreeType(),
setupext.FT2Font(),
- setupext.Png(),
setupext.Qhull(),
setupext.Image(),
setupext.TTConv(),
@@ -262,6 +261,7 @@ if __name__ == '__main__':
"cycler>=0.10",
"kiwisolver>=1.0.1",
"numpy>=1.11",
+ "pillow",
"pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6",
"python-dateutil>=2.1",
],
Comment by Atomic (Atomic) - Saturday, 25 July 2020, 13:47 GMT
Accidental double post.

Loading...