# Maintainer: Bruno Pagani <archange@archlinux.org>

_pkg=qpageview
pkgname=python-${_pkg}
pkgver=1.0.0
pkgrel=1
pkgdesc="Page based document viewer widget for Qt5/PyQt5"
arch=(any)
url="https://qpageview.org/"
license=(GPL3)
depends=(python python-pyqt6 qt6-svg)
makedepends=(python-build python-installer python-hatchling)
optdepends=('python-pycups: printing support')
source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
sha256sums=('3662b69112ddba0a03efc475f5acd176930dde4c3db6588d548d417946f30907')

build() {
  cd ${_pkg}-${pkgver}
  python -m build --wheel --no-isolation
}

package() {
  cd ${_pkg}-${pkgver}
  python -m installer --destdir="${pkgdir}" dist/*.whl
}
