diff mbox series

[v2,1/5] package: python-pymupdf: add missing python-zlib dependency

Message ID 20240607163208.1445715-1-raphael.melotte@mind.be
State Accepted
Headers show
Series [v2,1/5] package: python-pymupdf: add missing python-zlib dependency | expand

Commit Message

Raphaël Mélotte June 7, 2024, 4:32 p.m. UTC
It turns out that python-pymupdf doesn't require zlib directly, but it
does require the zlib python module.

This fixes the following runtime error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.11/site-packages/fitz/__init__.py", line 22, in <module>
  File "/usr/lib/python3.11/site-packages/fitz/fitz.py", line 3402, in <module>
  File "/usr/lib/python3.11/gzip.py", line 9, in <module>
ModuleNotFoundError: No module named 'zlib'

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
---
 package/python-pymupdf/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni July 13, 2024, 8:34 p.m. UTC | #1
On Fri,  7 Jun 2024 18:32:02 +0200
Raphaël Mélotte via buildroot <buildroot@buildroot.org> wrote:

> It turns out that python-pymupdf doesn't require zlib directly, but it
> does require the zlib python module.
> 
> This fixes the following runtime error:
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python3.11/site-packages/fitz/__init__.py", line 22, in <module>
>   File "/usr/lib/python3.11/site-packages/fitz/fitz.py", line 3402, in <module>
>   File "/usr/lib/python3.11/gzip.py", line 9, in <module>
> ModuleNotFoundError: No module named 'zlib'
> 
> Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>

You had forgotten to drop the "zlib" dependency in MUPDF_DEPENDENCIES,
so I dropped it as well. And applied your patch!

And in fact this lead me to look more into mupdf, and I was curious to
see why it depended on X11. Except it does not: it is a purely optional
dependency. And I found other things that were not correct/useful
anymore in the package so I did a few preparation commits:

https://gitlab.com/buildroot.org/buildroot/-/commit/f7deaa1330baad303afb76a7711faeeb1ddfee5d
https://gitlab.com/buildroot.org/buildroot/-/commit/90f0a484671098f9a94ce66b8f8af94e106ae106
https://gitlab.com/buildroot.org/buildroot/-/commit/2c0d7b72c0993a55c8dcb7b38d85792e1bf6e8bc

and ultimately, I dropped the X.org dependency also on python-pymupdf:

https://gitlab.com/buildroot.org/buildroot/-/commit/edfa6f29785e618b75739b702fc863ee2410908d

Thomas
Peter Korsgaard Aug. 12, 2024, 9:51 a.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Fri,  7 Jun 2024 18:32:02 +0200
 > Raphaël Mélotte via buildroot <buildroot@buildroot.org> wrote:

 >> It turns out that python-pymupdf doesn't require zlib directly, but it
 >> does require the zlib python module.
 >> 
 >> This fixes the following runtime error:
 >> 
 >> Traceback (most recent call last):
 >> File "<stdin>", line 1, in <module>
 >> File "/usr/lib/python3.11/site-packages/fitz/__init__.py", line 22, in <module>
 >> File "/usr/lib/python3.11/site-packages/fitz/fitz.py", line 3402, in <module>
 >> File "/usr/lib/python3.11/gzip.py", line 9, in <module>
 >> ModuleNotFoundError: No module named 'zlib'
 >> 
 >> Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>

 > You had forgotten to drop the "zlib" dependency in MUPDF_DEPENDENCIES,
 > so I dropped it as well. And applied your patch!

 > And in fact this lead me to look more into mupdf, and I was curious to
 > see why it depended on X11. Except it does not: it is a purely optional
 > dependency. And I found other things that were not correct/useful
 > anymore in the package so I did a few preparation commits:

 > https://gitlab.com/buildroot.org/buildroot/-/commit/f7deaa1330baad303afb76a7711faeeb1ddfee5d
 > https://gitlab.com/buildroot.org/buildroot/-/commit/90f0a484671098f9a94ce66b8f8af94e106ae106
 > https://gitlab.com/buildroot.org/buildroot/-/commit/2c0d7b72c0993a55c8dcb7b38d85792e1bf6e8bc

 > and ultimately, I dropped the X.org dependency also on python-pymupdf:

 > https://gitlab.com/buildroot.org/buildroot/-/commit/edfa6f29785e618b75739b702fc863ee2410908d

Committed all 4 to 2024.02.x and 2024.05.x, thanks.
diff mbox series

Patch

diff --git a/package/python-pymupdf/Config.in b/package/python-pymupdf/Config.in
index ecaa5496b5..3831a25451 100644
--- a/package/python-pymupdf/Config.in
+++ b/package/python-pymupdf/Config.in
@@ -7,7 +7,7 @@  config BR2_PACKAGE_PYTHON_PYMUPDF
 	select BR2_PACKAGE_HOST_SWIG
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_MUPDF
-	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_PYTHON3_ZLIB # runtime
 	help
 	  Python bindings for the PDF rendering library MuPDF.