# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Francois Boulogne <fboulogne at april dot org>

pkgname=python-argh
pkgver=0.31.3
_commit=21528aefc839458322f70aac7bf0949f82e60780
pkgrel=1
pkgdesc="An unobtrusive argparse wrapper with natural syntax"
arch=(any)
url="https://pypi.python.org/pypi/argh"
license=('LGPL3')
depends=('python')
optdepends=('python-argcomplete: for completion')
makedepends=('git' 'python-build' 'python-installer' 'python-flit-core')
checkdepends=('python-pytest' 'python-argcomplete')
source=("git+https://github.com/neithere/argh.git#commit=$_commit")
sha256sums=('188c1a0ebb69c2362ec18fa8f3911582b1012cc9f67cd3f134cb86ae2975cbd3')

build() {
  cd argh
  python -m build -nw
}

check() {
  cd argh
  PYTHONPATH=src pytest
}

package() {
  cd argh
  python -m installer -d "$pkgdir" dist/*.whl
}
