_name=django-post-office
pkgname=python-django-post-office
pkgver=3.11.2
pkgrel=1
pkgdesc="A Django app to monitor and send mail asynchronously, complete with template support."
arch=(any)
url="https://github.com/ui/django-post_office"
license=('MIT')
depends=('python-django-jsonfield')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools-scm')
source=("https://github.com/ui/django-post_office/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('daf530a382530388f6fee6af6816c191ff8dabf819bb5286eeb21abaec9d0c4b')

build() {
  cd "$srcdir/django-post_office-${pkgver}"

  python -m build --wheel --no-isolation
}

package() {
  cd "$srcdir/django-post_office-${pkgver}"

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
