Commit Graph

2 Commits

Author SHA1 Message Date
James Hilliard
9b9333c929 package/python-pymupdf: bump to version 1.23.22
The python-pymupdf and mupdf packages do not follow the exact same
version numbers anymore. There is no specific mention of version
compatibilities in the upstream package, so update our comment to just
say that both should be "compatible" (to try to avoid one being
updated without the other).

The hardcoded paths we used to remove from setup.py are no longer
present, so the post-patch hook is removed.  The new setup.py instead
uses new environment variables which we now provide.

This new python-pymupdf version fails at runtime when mupdf builds
static libraries.

Note also that python-pymupdf is gradually switching to a new
implementation that requires mupdf to be built with python
bindings. For now, both implementations are still available but we
only compile the old one. The runtime test is adapted accordingly as
the legacy implementation has to be imported with "fitz_old".

While at it, the dependencies are also split to one per line to make
them easier to diff in the future.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[Raphaël:
 - fix cross-compilation
 - remove unneeded dependencies
 - update to 1.23.22
 - update the commit message
]
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-13 21:55:26 +02:00
Raphaël Mélotte
115e9493b8 support/testing: add new test for python-pymupdf
To give us a chance to catch runtime issues (such as missing
dependencies) more easily, add a test that writes a sample PDF file,
read it back and verify the text that was read.

Like similar packages that lead to a big
rootfs (e.g. python-botocore), this test requires a separate ext2
rootfs to avoid filling the default amount of RAM available
entirely (which would cause missing files from the root filesystem and
in turn, test failures).

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-07-13 21:54:42 +02:00