# Maintainer: Drew DeVault pkgname=py-hypothesis pkgver=4.14.3 pkgrel=0 pkgdesc="Advanced property-based (QuickCheck-like) testing for Python" url="http://hypothesis.works/" arch="noarch" license="MPL-2.0" _py2_deps="py2-coverage" _py3_deps="py3-coverage" makedepends=" $_py2_deps $_py3_deps python2-dev python3-dev py2-setuptools py3-setuptools py-enum34 " subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="py-hypothesis-$pkgver.tar.gz::https://github.com/HypothesisWorks/hypothesis-python/archive/hypothesis-python-$pkgver.tar.gz" builddir="$srcdir/hypothesis-hypothesis-python-$pkgver/hypothesis-python" options="!check" # upstream tests are broken prepare() { cp -r "$builddir" "$builddir"-py2 } build() { cd "$builddir" python3 setup.py build cd "$builddir"-py2 python2 setup.py build } check() { cd "$builddir" python3 setup.py test cd "$builddir"-py2 python2 setup.py test } package() { mkdir -p "$pkgdir" } _py2() { depends="$_py2_deps" cd "$builddir"-py2 _py python2 } _py3() { depends="$_py3_deps" cd "$builddir" _py python3 } _py() { _python="$1" pkgdesc="$pkgdesc (for $_python)" depends="$depends $_python" install_if="$pkgname=$pkgver-r$pkgrel $_python" $_python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="56f0a796741b1a46bfe91e578dc76067b612d0041dd8b93043521c8e53827a5bcdd815f94e91d22d4ae9d13125bfb9012cb1c4660635e7cc93472141be504efb py-hypothesis-4.14.3.tar.gz"