# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 PYTHON_COMPAT=( python3_{12..14} ) DISTUTILS_USE_PEP517=standalone DISTUTILS_EXT=1 inherit toolchain-funcs distutils-r1 optfeature # The GitHub repository and its archive directory keep upstream's casing. MY_P="PyMuPDF-${PV}" DESCRIPTION="A Python library for manipulation of PDF documents" HOMEPAGE=" https://github.com/pymupdf/pymupdf https://pymupdf.readthedocs.io " # 2.0 folds pymupdf_layout and pymupdf4llm into this package; upstream's # PyPI releases of those two are now empty transition wheels. Build all three # from their release tags, as upstream's pymupdf wheel does. verified 2026-10-22 LAYOUT_P="pymupdf_layout-${PV}" LLM_P="pymupdf4llm-${PV}" SRC_URI=" https://github.com/pymupdf/PyMuPDF/archive/${PV}.tar.gz -> ${MY_P}.gh.tar.gz https://github.com/ArtifexSoftware/pymupdf_layout/archive/refs/tags/${PV}.tar.gz -> ${LAYOUT_P}.gh.tar.gz https://github.com/pymupdf/pymupdf4llm/archive/refs/tags/${PV}.tar.gz -> ${LLM_P}.gh.tar.gz " S="${WORKDIR}/${MY_P}" LICENSE="AGPL-3" SLOT="0" KEYWORDS="~amd64 ~arm64" DEPEND=" dev-python/mupdf:=[${PYTHON_USEDEP}] dev-python/pymupdf-fonts[${PYTHON_USEDEP}] " # Layout and 4llm runtime requirements, from setup.py's requires_dist with # both embedded. verified 2026-10-22 RDEPEND=" ${DEPEND} dev-python/networkx[${PYTHON_USEDEP}] dev-python/numpy[${PYTHON_USEDEP}] dev-python/psutil[${PYTHON_USEDEP}] dev-python/pyyaml[${PYTHON_USEDEP}] dev-python/tabulate[${PYTHON_USEDEP}] sci-libs/onnxruntime[python,${PYTHON_USEDEP}] !