Files
gentoo/dev-python/pypdf/pypdf-6.17.0.ebuild
Michał Górny 61524a4f4b dev-python/pypdf: Bump to 6.17.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2026-09-05 06:54:50 +02:00

60 lines
1.4 KiB
Bash

# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit-core
PYPI_VERIFY_REPO=https://github.com/py-pdf/pypdf
PYTHON_COMPAT=( python3_{12..15} )
inherit distutils-r1 pypi
SAMPLE_COMMIT=818dc013ad1f537198e9fcfae8a6b0dffe25ffa3
DESCRIPTION="Python library to work with PDF files"
HOMEPAGE="
https://pypi.org/project/pypdf/
https://github.com/py-pdf/pypdf/
"
SRC_URI+="
test? (
https://github.com/py-pdf/sample-files/archive/${SAMPLE_COMMIT}.tar.gz
-> ${PN}-sample-files-${SAMPLE_COMMIT}.gh.tar.gz
)
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
BDEPEND="
test? (
>=dev-python/cryptography-3.1[${PYTHON_USEDEP}]
dev-python/fonttools[${PYTHON_USEDEP}]
>=dev-python/pillow-8.0.0[jpeg,jpeg2k,tiff,zlib,${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
media-libs/jbig2dec[png]
)
"
EPYTEST_PLUGINS=( pytest-timeout )
EPYTEST_XDIST=1
distutils_enable_tests pytest
EPYTEST_DESELECT=(
# probably requires extra deps
tests/test_appearance_stream.py::test_appearance_stream_rtl
# speed test, uses tons of memory
tests/test_filters.py::test_flatedecode__decode_png_prediction__speed
)
src_unpack() {
default
if use test; then
mv "sample-files-${SAMPLE_COMMIT}" "${S}"/sample-files || die
fi
}
python_test() {
epytest -o addopts= -m "not enable_socket"
}