# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Sebastien Leduc <sebastien@sleduc.fr>
# Contributor: Roberto Catini <roberto.catini@gmail.com>

pkgname=python-requests-oauthlib
pkgver=1.3.1
pkgrel=5
pkgdesc="First-class OAuth library support for Requests"
arch=('any')
url="https://pypi.python.org/pypi/requests-oauthlib"
license=('custom:ISC')
depends=('python-requests' 'python-oauthlib')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-requests-mock' 'python-pyjwt')
source=("$pkgname-$pkgver.tar.gz::https://github.com/requests/requests-oauthlib/archive/v$pkgver.tar.gz")
sha512sums=('86fe34d39ad7224fd44a1b0c4fbf3784032239b894ae73ba65043941cde9675c2f8abedf44ccc00b5fb1648b8e261de258464b311f3ace6392ab6202fb50aa08')

build() {
  cd requests-oauthlib-$pkgver
  python setup.py build
}

check() {
  cd requests-oauthlib-$pkgver
  py.test
}

package() {
  cd requests-oauthlib-$pkgver
  python setup.py install --root="$pkgdir/" --optimize=1
  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
