# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-requests-mock
pkgver=1.11.0
_commit=15df8e2b85ae71afea1013b5bf9fd010623acd39
pkgrel=2
pkgdesc="A mock of useful classes and functions to be used with python-requests."
arch=(any)
url="https://github.com/jamielennox/requests-mock"
license=('Apache')
depends=('python-requests' 'python-six')
makedepends=('git' 'python-pbr' 'python-setuptools')
checkdepends=('python-purl' 'python-pytest' 'python-requests-futures' 'python-testtools' 'python-fixtures')
source=("git+https://github.com/jamielennox/requests-mock.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd requests-mock
  python setup.py build
}

check() {
  cd requests-mock
  python -m pytest tests/pytest
  python -m testtools.run discover
}

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