# Maintainer: RocketDev <ma2014119@outlook.com>
_pkgbase='qt-themes'
pkgname=python-$_pkgbase
pkgver=0.4.0
pkgrel=2
pkgdesc='A collection of themes for Qt in Python'
arch=('any')
url='https://github.com/beatreichenbach/qt-themes'
license=('MIT')
depends=(
    'python'
    'python-qtpy' # qtpy first, then fallback to pyside6, pyside2
)
makedepends=(
    'python-build'
    'python-setuptools'
    'python-installer'
    'python-wheel'
)
source=(
    "$_pkgbase-$pkgver.tar.gz::https://github.com/beatreichenbach/qt-themes/archive/v$pkgver.tar.gz"
)
b2sums=('b37935424946c9a14b2da73d60887e73d52c819b64c46f5e115e2f5f1e75ee9b35d1cec0cc3225a866a613d8fdeaf0ac8d6d878c19633d5b83e6096fa4c9229f')

build() {
    cd "$srcdir/$_pkgbase-$pkgver"
    python -m build --wheel --no-isolation
}

package() {
    cd "$srcdir/$_pkgbase-$pkgver"
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
