aports/community/py3-pikepdf/APKBUILD
2025-05-16 16:56:29 +00:00

59 lines
1.2 KiB
Text

# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=py3-pikepdf
_pyname=pikepdf
pkgver=9.5.2
pkgrel=1
pkgdesc="Python library for reading and writing PDF"
url="https://github.com/pikepdf/pikepdf"
arch="all"
license="MPL-2.0"
depends="
py3-deprecated
py3-lxml
py3-packaging
py3-pillow
python3
"
makedepends="
py3-gpep517
py3-installer
py3-pybind11-dev
py3-setuptools
py3-wheel
python3-dev
qpdf-dev
"
checkdepends="
py3-hypothesis
py3-psutil
py3-pytest
py3-pytest-xdist
"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/pikepdf/pikepdf/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
# secfixes:
# 2.9.1-r2:
# - CVE-2021-29421
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest -n auto
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/pikepdf-*.whl
}
sha512sums="
698a67bc23f004b13fc1b42e04d1e4133229341b9e9a55c2944f5d19d6d1ce143db4e1f063224453b6ab708a78f1e52cbdf36504e946def6e48b15ad0b352539 py3-pikepdf-9.5.2.tar.gz
"