Date: Monday, April 17, 2023 @ 08:46:29
  Author: dvzrv
Revision: 1446616

archrelease: copy trunk to community-x86_64

Added:
  python-pymupdf/repos/community-x86_64/PKGBUILD
    (from rev 1446615, python-pymupdf/trunk/PKGBUILD)
Deleted:
  python-pymupdf/repos/community-x86_64/PKGBUILD

----------+
 PKGBUILD |  144 +++++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 83 insertions(+), 61 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-17 08:46:08 UTC (rev 1446615)
+++ PKGBUILD    2023-04-17 08:46:29 UTC (rev 1446616)
@@ -1,61 +0,0 @@
-# Maintainer: David Runge <[email protected]>
-
-_name=PyMuPDF
-pkgname=python-pymupdf
-pkgver=1.21.1
-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)
-optdepends=(
-  'python-fonttools: for building font subsets using fontTools'
-  'python-pillow: for image file saving using pillow'
-)
-options=(debug)
-source=(
-  
https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz
-)
-sha512sums=('863afe65c7f84c941bc040053a09cb14f90d0d7a040c7f2efee94c40c522e959efb91460af8404f0562eb377fae056cd28b9de2b0881a91b9199d09baa6e7e77')
-b2sums=('056dc2cab19b120ff5f2dad7c1a71164372565796ce3c419e762b80f93aa130ede06dba7ed6500a28beb4b3de1a161986d091aabf88b44bce27d7e20c3a38308')
-
-prepare() {
-  # remove bundled mupdf sources
-  rm -frv $_name-$pkgver/*.tgz
-}
-
-build() {
-  cd $_name-$pkgver
-  # NOTE: build against system libmupdf
-  export PYMUPDF_SETUP_MUPDF_BUILD=""
-  python -m build --wheel --no-isolation
-}
-
-check() {
-  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'
-}
-
-package() {
-  depends+=(
-    freetype2 libfreetype.so
-    libjpeg-turbo libjpeg.so
-  )
-
-  cd $_name-$pkgver
-  python -m installer --destdir="$pkgdir" dist/*.whl
-  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
-}

Copied: python-pymupdf/repos/community-x86_64/PKGBUILD (from rev 1446615, 
python-pymupdf/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-04-17 08:46:29 UTC (rev 1446616)
@@ -0,0 +1,83 @@
+# Maintainer: David Runge <[email protected]>
+
+_name=PyMuPDF
+pkgname=python-pymupdf
+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
+  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'
+)
+source=(
+  
https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz
+)
+sha512sums=('0e261411f1bf73785a537d4f276fcdcf73fa27de19cdd587d20404881ccda9bfc6f1c55b64af4805a5820cae81b932f7cf768f15f955a185d9c8f291371f6bb7')
+b2sums=('298d1647d575b6a20f4bc8fecfdde747bfb398d0a228196668c9d9b826d55bb1dd257302ab6eee3cadc18d08d0bd1b12c2150d3d3d133e18267576ed0b61e62c')
+
+prepare() {
+  # remove bundled mupdf sources
+  rm -frv $pkgname/*.tgz
+  # we package swig and don't need python-swig
+  sed -e 's/, "swig"//' -i $_name-$pkgver/pyproject.toml
+}
+
+build() {
+  cd $_name-$pkgver
+  # NOTE: build against system libmupdf
+  export PYMUPDF_SETUP_MUPDF_BUILD=""
+  python -m build --wheel --no-isolation
+}
+
+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])")
+
+  cd $_name-$pkgver
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="$PWD/test_dir/$_site_packages:$PYTHONPATH"
+  pytest "${pytest_options[@]}" tests/
+}
+
+package() {
+  depends+=(
+    freetype2 libfreetype.so
+    libjpeg-turbo libjpeg.so
+  )
+
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
+}

Reply via email to