# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-ecdsa
pkgver=0.19.2
pkgrel=1
pkgdesc="Implementation of ECDSA in Python"
arch=('any')
url="https://github.com/tlsfuzzer/python-ecdsa"
license=('MIT')
depends=('python-six')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest' 'python-hypothesis')
options=(!emptydirs)
source=("git+https://github.com/tlsfuzzer/python-ecdsa.git#tag=python-ecdsa-$pkgver")
sha512sums=('1872e3f8778d023ae7967dcb225bd87e1192b9317d444f75d988983a320a84a8e55a50bcd30c16a2f210a02cb455cf09758d37f9be5cd3cd0510933323f47fd9')

prepare() {
  cd python-ecdsa
}

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

check() {
  cd python-ecdsa
  python -m pytest
}

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