# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-copr
pkgver=1.112
pkgrel=1
pkgdesc="Python client for copr service"
url="https://pagure.io/copr/copr"
license=('GPL')
arch=('any')
depends=('python-marshmallow' 'python-requests' 'python-requests-toolbelt' 'python-six' 'python-munch')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-mock')
source=("https://pagure.io/copr/copr/archive/python-copr-$pkgver-1/copr-python-copr-$pkgver-1.tar.gz")
sha512sums=('e59943e63da03c93b82e84106fe59e98836a1ff0f900cdbc0165cab733e436bf21c628bbc2e62c41938aaf1b07dd75be1dff73409d727f0de610756e816e7a1d')

build() {
  cd copr-python-copr-$pkgver-1/python
  python setup.py build
}

check() {
  cd copr-python-copr-$pkgver-1/python
  python -m pytest
}

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