[arch-commits] Commit in python-pymupdf/repos (2 files)

Felix Yan felixonmars at gemini.archlinux.org
Wed Dec 1 14:54:32 UTC 2021


    Date: Wednesday, December 1, 2021 @ 14:54:32
  Author: felixonmars
Revision: 1059512

archrelease: copy trunk to community-staging-x86_64

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

----------+
 PKGBUILD |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

Copied: python-pymupdf/repos/community-staging-x86_64/PKGBUILD (from rev 1059511, python-pymupdf/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-12-01 14:54:32 UTC (rev 1059512)
@@ -0,0 +1,45 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=PyMuPDF
+pkgname=python-pymupdf
+pkgver=1.19.2
+pkgrel=2
+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-setuptools swig systemd)
+checkdepends=(python-pillow python-pytest)
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
+sha512sums=('98d52b09bcc6f0d5002f0eea05f5c4b7b6c65a8e29e8d8200292a806b89721a39e2151cdbd99edd1eedb2e547da97f6f50f2fea39c893c4abfbbcb7ec9cc793f')
+b2sums=('b17adade2d0a99e09890a96a9fc5e07f4e30b0f640a42b78691a4e2a7540c6138cb66c8c5c08112ec1613c73e2589c9c47c64118108c8d191bd63ebd86f44add')
+
+prepare() {
+  mv -v "$_name-$pkgver" "$pkgname-$pkgver"
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+check() {
+  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+  local _test_dir="test_dir"
+  cd "$pkgname-$pkgver"
+  mkdir -vp "${_test_dir}"
+  # install to test dir for testing
+  python setup.py install --optimize=1 --root="${_test_dir}"
+
+  export PYTHONPATH="${_test_dir}/${_site_packages}:${PYTHONPATH}"
+  pytest -v -k "not test_font1 and not test_pageids and not test_textbox3"
+}
+
+package() {
+  depends+=(libfreetype.so libjpeg.so)
+
+  cd "$pkgname-$pkgver"
+  python setup.py install --optimize=1 --root="${pkgdir}"
+  install -vDm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list