# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Matthew McGinn <mamcgi@gmail.com>
# Contributor: Carl George < arch at cgtx dot us >

_name="click-plugins"
pkgname=python-click-plugins
pkgver=1.1.1
pkgrel=12
pkgdesc="An extension module for click to enable registering CLI commands via setuptools entry-points."
arch=("any")
url="https://github.com/click-contrib/click-plugins"
license=("BSD")
depends=("python-click")
makedepends=("python-setuptools")
checkdepends=("python-pytest" "python-click")
source=("https://pypi.python.org/packages/source/${_name:0:1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b')

build() {
    cd "$srcdir/$_name-$pkgver"
    python setup.py build
}

check() {
    export LC_ALL="en_US.UTF-8"
    cd "$srcdir/$_name-$pkgver"
    py.test tests
}

package() {
    depends=("python-click")
    cd "$srcdir/$_name-$pkgver"
    python setup.py install --skip-build --root="$pkgdir" --optimize=1
    install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
