# Maintainer: Balló György <ballogyor+arch at gmail dot com>

_pkgname=pykeepass
pkgname=python-pykeepass
pkgver=3.0.3
pkgrel=2
pkgdesc="Python library to interact with keepass databases"
arch=('any')
url="https://github.com/pschmitt/pykeepass"
license=('GPL3')
depends=(python-argon2_cffi python-construct python-dateutil python-future python-lxml python-pycryptodome)
makedepends=(git python-setuptools)
_commit=11ee6052ba83861cd9c08e7fd64b6780f9354e1c  # tags/3.0.3^0
source=("git+https://github.com/pschmitt/pykeepass#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $_pkgname
  git describe --tags | sed 's/-/+/g'
}

build() {
  cd $_pkgname
  python3 setup.py build
}

package() {
  cd $_pkgname
  python3 setup.py install --root="$pkgdir" --optimize=1
  rm -r "$pkgdir"/usr/lib/python*/site-packages/tests/
}
