# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>

pkgname=python-cliff
pkgver=4.8.0
_commit=4826a43b991fcb1c4e24d129c800f22f4dc52fa1
pkgrel=1
pkgdesc="Command Line Interface Formulation Framework"
arch=('any')
url="https://docs.openstack.org/cliff/latest/"
license=('Apache')
depends=('python-autopage' 'python-cmd2' 'python-prettytable' 'python-stevedore' 'python-yaml')
makedepends=('git' 'python-setuptools' 'python-pbr')
checkdepends=('python-stestr' 'python-sphinx' 'python-testscenarios')
options=('!emptydirs')
source=("git+https://github.com/openstack/cliff.git#commit=$_commit")
sha512sums=('c6d63c3ded4008e4215b26fab8e2cd6d686b9712c2021960e33fd58cdbefe3a5ad12f2934d8f14e3a86b54e68d44359a5bd0a17e6a48aeec12ecbd7da56ada61')

build() {
  cd cliff
  python setup.py build
}

check() {
  cd cliff
  PYTHONPATH="$PWD/build/lib" stestr run
}

package() {
  cd cliff
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
