# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: David Campbell <davekong@archlinux.us>
# Contributor: Cilyan Olowen <gaknar@gmail.com>

pkgname=python-paste
pkgver=3.5.3
pkgrel=1
pkgdesc="Tools for using a Web Server Gateway Interface stack"
arch=('any')
url="https://pythonpaste.readthedocs.io/"
license=('MIT')
depends=('python-six')
optdepends=('python-flup: WSGI utilities')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-flup')
source=("https://files.pythonhosted.org/packages/source/P/Paste/Paste-${pkgver}.tar.gz")
sha512sums=('3087ea7b6cc45a90b85c473cbff7f018ca961536ff70fbed4610f86dedc82cef0274ccddb767de411ec2955d0c265cb4e797a14a25697870c38667ccd7c4a2d8')

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

check() {
  cd Paste-$pkgver
  PYTHONWARNINGS="ignore::DeprecationWarning" pytest
}

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

  install -Dm644 docs/license.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
}
