Files
rpi-buildroot/package/python-pymupdf/python-pymupdf.mk
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

26 lines
1.0 KiB
Makefile

################################################################################
#
# python-pymupdf
#
################################################################################
# python-pymupdf's version must be compatible with mupdf's version
PYTHON_PYMUPDF_VERSION = 1.23.22
PYTHON_PYMUPDF_SOURCE = PyMuPDF-$(PYTHON_PYMUPDF_VERSION).tar.gz
PYTHON_PYMUPDF_SITE = https://files.pythonhosted.org/packages/05/20/a0d1221d8f379afcc12b4d1687a8f4adb69eef659e835d781c3fa331ff46
PYTHON_PYMUPDF_SETUP_TYPE = setuptools
PYTHON_PYMUPDF_LICENSE = AGPL-3.0+
PYTHON_PYMUPDF_LICENSE_FILES = COPYING
# No license file included in pip, but it's present on github
PYTHON_PYMUPDF_DEPENDENCIES = freetype host-swig mupdf
PYTHON_PYMUPDF_BUILD_OPTS = --skip-dependency-check
PYTHON_PYMUPDF_ENV = \
PYMUPDF_INCLUDES="$(STAGING_DIR)/usr/include/freetype2:$(STAGING_DIR)/usr/include" \
PYMUPDF_MUPDF_LIB="$(STAGING_DIR)/usr/lib" \
PYMUPDF_PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python3-config" \
PYMUPDF_SETUP_IMPLEMENTATIONS=a \
PYMUPDF_SETUP_MUPDF_BUILD=
$(eval $(python-package))