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

pkgname=python-cliff
pkgver=4.13.1
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#tag=$pkgver"
         python-3.14.patch)
sha512sums=('1b3486f8c711a07a3f0f3e8b465c84852c5fa92d3c400e20fbc1aa5c4f3e9d7d9a90a07799757ae29b1e1205d3c60860076cecfc9571482d0cc2a2c755f52372'
            '1e54f20b56e495177e42a37b74d4e495f3bb9dbb91d2662dcdafd87464214c466ebb8ba1be32313e4b1312dc26b5ea59d8e99f5e227422bac03231310e42ddbf')

prepare() {
  cd cliff
  patch -p1 -i ../python-3.14.patch # Fix tests
}

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:
