# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>

pkgname=python-email-validator
pkgver=2.1.1
pkgrel=2
pkgdesc="A robust email address syntax and deliverability validation library"
arch=(any)
url="https://github.com/JoshData/python-email-validator"
license=(Unlicense)
depends=(
  python
  python-dnspython
  python-idna
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
checkdepends=(python-pytest)
source=($pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz)
sha512sums=('fbc34d63a2fd7004a1efd7ce88cce8279069a7e2008666a06da173cb807f3cf51fbec16b6b26385de45b6b024e9359769147947f2a560e9ada614be162d51534')
b2sums=('251440b934625144b0aca7c5767187d2b1b5d8ac40fee41746e797736d0958b4fc4ffe810b623627357c43241cb6baec923d1467af735bbac92f7159c277e6dc')

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

check() {
  cd $pkgname-$pkgver
  python -m pytest
}

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

# vim:set ts=2 sw=2 et:
