void-packages/srcpkgs/python3-pypdf/template

40 lines
1.4 KiB
Bash

# Template file for 'python3-pypdf'
pkgname=python3-pypdf
version=3.14.0
revision=1
_sample_files_gitrev=5b5ee6b0e9bf4b683490351b1e15e01d6553da7b
build_wrksrc="pypdf-${version}"
build_style=python3-pep517
# requires unpackaged fpdf2
make_check_args="-k not(test_compression)"
hostmakedepends="python3-flit_core"
depends="python3-Pillow"
checkdepends="python3-pytest python3-pytest-timeout python3-pycryptodome ${depends}"
short_desc="PDF library for splitting, merging, cropping, and transforming pages"
maintainer="Piotr Wójcik <chocimier@tlen.pl>"
license="BSD-3-Clause"
homepage="https://pypdf.readthedocs.io/en/latest/"
changelog="https://raw.githubusercontent.com/py-pdf/pypdf/main/CHANGELOG.md"
distfiles="https://github.com/py-pdf/pypdf/archive/refs/tags/${version}.tar.gz
https://github.com/py-pdf/sample-files/archive/${_sample_files_gitrev}.tar.gz"
checksum="b3a340430faa9a8fb610240b74132f3ce3aa0c4b7e5436776a0c3202db00aae6
9b9b3b8b4735c87d79bcd17e35312613cdaf1f6bc41c00c4b278b3157bda26ce"
post_extract() {
rmdir ${build_wrksrc}/sample-files
mv sample-files-${_sample_files_gitrev} ${build_wrksrc}/sample-files
# requires unpackaged pytest-socket
vsed -e '/addopts/d' -i ${build_wrksrc}/pyproject.toml
}
post_install() {
vlicense LICENSE
}
python3-PyPDF2_package() {
depends="${sourcepkg}>=${version}_${revision}"
build_style=meta
short_desc+=" (transitional dummy package)"
}