# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=python-idna
pkgver=3.10
pkgrel=1
pkgdesc="Internationalized Domain Names in Applications (IDNA)"
arch=('any')
license=('BSD')
url="https://github.com/kjd/idna"
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-flit-core')
checkdepends=('python-pytest')
source=("git+https://github.com/kjd/idna.git#tag=v$pkgver")
sha512sums=('3b4a123fcc027210a04e29514c48afe5618e02f910aabb7c4dd31c6f43e5935e872b5499c20bdcde41aad53011d3981e30c7cae4c0692999f821e6a01b43e278')

build() {
   cd idna
   python -m build --no-isolation --wheel
}

check() {
   cd idna
   pytest
}

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