Date: Monday, April 17, 2023 @ 08:46:08 Author: dvzrv Revision: 1446615
upgpkg: python-pymupdf 1.22.0-1: Upgrade to 1.22.0. Remove unneeded patches. Use bash arrays with one entry per line for better handling. Modified: python-pymupdf/trunk/PKGBUILD ----------+ PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-04-17 08:44:13 UTC (rev 1446614) +++ PKGBUILD 2023-04-17 08:46:08 UTC (rev 1446615) @@ -2,15 +2,37 @@ _name=PyMuPDF pkgname=python-pymupdf -pkgver=1.21.1 +pkgver=1.22.0 pkgrel=1 pkgdesc="Python bindings for MuPDF's rendering library" arch=(x86_64) url="https://github.com/pymupdf/PyMuPDF" license=(AGPL3) -depends=(glibc gumbo-parser jbig2dec libmupdf openjpeg2 python) -makedepends=(freetype2 libjpeg-turbo python-distro python-build python-installer python-setuptools python-wheel swig systemd) -checkdepends=(python-fonttools python-pillow python-pytest) +depends=( + glibc + gumbo-parser + jbig2dec + libmupdf + openjpeg2 + python +) +makedepends=( + freetype2 + git + libjpeg-turbo + python-build + python-distro + python-installer + python-setuptools + python-wheel + swig + systemd +) +checkdepends=( + python-fonttools + python-pillow + python-pytest +) optdepends=( 'python-fonttools: for building font subsets using fontTools' 'python-pillow: for image file saving using pillow' @@ -18,12 +40,14 @@ source=( https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz ) -sha512sums=('863afe65c7f84c941bc040053a09cb14f90d0d7a040c7f2efee94c40c522e959efb91460af8404f0562eb377fae056cd28b9de2b0881a91b9199d09baa6e7e77') -b2sums=('056dc2cab19b120ff5f2dad7c1a71164372565796ce3c419e762b80f93aa130ede06dba7ed6500a28beb4b3de1a161986d091aabf88b44bce27d7e20c3a38308') +sha512sums=('0e261411f1bf73785a537d4f276fcdcf73fa27de19cdd587d20404881ccda9bfc6f1c55b64af4805a5820cae81b932f7cf768f15f955a185d9c8f291371f6bb7') +b2sums=('298d1647d575b6a20f4bc8fecfdde747bfb398d0a228196668c9d9b826d55bb1dd257302ab6eee3cadc18d08d0bd1b12c2150d3d3d133e18267576ed0b61e62c') prepare() { # remove bundled mupdf sources - rm -frv $_name-$pkgver/*.tgz + rm -frv $pkgname/*.tgz + # we package swig and don't need python-swig + sed -e 's/, "swig"//' -i $_name-$pkgver/pyproject.toml } build() { @@ -34,18 +58,17 @@ } check() { + local pytest_options=( + -vv + # disable broken test, that upstream is not interested in fixing or disabling: https://github.com/pymupdf/PyMuPDF/issues/2127 + --deselect tests/test_pixmap.py::test_color_count + ) local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])") - local _test_dir="test_dir" cd $_name-$pkgver - mkdir -vp $_test_dir - # install to test dir for testing - python -m installer --destdir="$_test_dir" dist/*.whl - - export PYTHONPATH="$_test_dir/$_site_packages:$PYTHONPATH" - # disable broken test: https://github.com/pymupdf/PyMuPDF/issues/2040 - # disable broken test: https://github.com/pymupdf/PyMuPDF/issues/2127 - pytest -vv -c /dev/null tests/ -k 'not test_textbox3 and not test_color_count' + python -m installer --destdir=test_dir dist/*.whl + export PYTHONPATH="$PWD/test_dir/$_site_packages:$PYTHONPATH" + pytest "${pytest_options[@]}" tests/ } package() {
