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

pkgname=python-cmd2
pkgver=2.4.3
_commit=031832a76b7a9e25d708153085d18d5366ff318d
pkgrel=3
pkgdesc="A tool for building interactive command line apps"
arch=('any')
url="https://github.com/python-cmd2/cmd2"
license=('MIT')
depends=('python-attrs' 'python-colorama' 'python-pyperclip' 'python-wcwidth')
makedepends=('git' 'python-setuptools-scm' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest-cov' 'python-pytest-mock' 'python-pytest-xdist' 'vi')
source=("git+https://github.com/python-cmd2/cmd2.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd cmd2
  python -m build --wheel --no-isolation
}

check() {
  cd cmd2
  PYTHONPATH="$PWD/cmd2" pytest
}

package() {
  cd cmd2
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

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