# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Alberto Redondo <albertomost at gmail dot com>
# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>
# Contributor: Chih-Hsuan Yen <yan12125@gmail.com>
# Contributor: Alexander 'z33ky' Hirsch <1zeeky@gmail.com>

_pkgname=requests-futures
pkgname=python-requests-futures
pkgver=1.0.1
pkgrel=3
pkgdesc='Asynchronous Python HTTP Requests for Humans using Futures'
arch=('any')
url='https://github.com/ross/requests-futures'
license=('Apache')
depends=('python-requests')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'pifpaf' 'httpbin')
source=(https://files.pythonhosted.org/packages/source/r/requests-futures/requests-futures-$pkgver.tar.gz)
sha256sums=('f55a4ef80070e2858e7d1e73123d2bfaeaf25b93fd34384d8ddf148e2b676373')

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

check() {
  cd requests-futures-$pkgver
  eval `pifpaf run httpbin`
  HTTPBIN_URL="${PIFPAF_URLS}/" pytest
  pifpaf_stop
}

package() {
  cd requests-futures-$pkgver
  python setup.py install \
    -O1 \
    --root="$pkgdir" \
    --skip-build
}
