# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-webtest
_pkgname=WebTest
pkgver=2.0.9
pkgrel=0
pkgdesc="A Helper to test WSGI applications"
url="http://webtest.pythonpaste.org/"
arch="noarch"
license="MIT"
depends="python2"
depends_dev=""
makedepends="python2-dev py-setuptools py-waitress py-six py-beautifulsoup4
			py-webob"
install=""
subpackages=""
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip"

_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	python2 setup.py build || return 1
}

package() {
	cd "$_builddir"
	python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
}

md5sums="bf0a04fcf8b2cdcaa13b04324cefb53d  WebTest-2.0.9.zip"
sha256sums="749f527b39893b1757abd0e6814bde811eb25a6cf42538585c971afdb9030dad  WebTest-2.0.9.zip"
sha512sums="004848c0474a06f81849b1983d9c50ba9e142b7bfb1ce64924074b197f26cb15ac272fe5917a9c7c04b38ff2b39d191cc8d310dd2f321be878deeff710294d7a  WebTest-2.0.9.zip"
