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

pkgname=python-ecdsa
pkgver=0.19.1
pkgrel=1
pkgdesc="Implementation of ECDSA in Python"
arch=('any')
url="https://github.com/tlsfuzzer/python-ecdsa"
license=('MIT')
depends=('python-six')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-hypothesis')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/e/ecdsa/ecdsa-$pkgver.tar.gz")
sha512sums=('2a5526d1caf2e8e3a86b5f7bb0263249c8983734a8a0af7d7bbbc6be7fdb36f73ed9bf22f9741257971bc6a184960e1003036f75c966adae6dc58a0df0073b32')

prepare() {
  cd ecdsa-$pkgver
}

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

package() {
  cd ecdsa-$pkgver
  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
