# Contributor: Drew DeVault # Maintainer: Leo pkgname=py3-hypothesis pkgver=4.36.2 pkgrel=0 pkgdesc="Advanced property-based (QuickCheck-like) testing for Python" url="https://hypothesis.works/" arch="noarch" license="MPL-2.0" depends="py3-attrs" makedepends="py3-setuptools" checkdepends="py3-pytest py3-coverage py3-tz py3-numpy py3-dateutil" 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" replaces="py-hypothesis" # Backwards compatibility provides="py-hypothesis=$pkgver-r$pkgrel" # Backwards compatibility build() { python3 setup.py build } check() { # In python3 mock is actually unittest.mock sed -e 's/from mock/from unittest.mock/' -i tests/cover/test_regressions.py sed -e 's/from mock/from unittest.mock/' -i tests/cover/test_reflection.py # Add variables that will be used by python to find the local # hypothesis build PYPATH="$PWD/build/lib" PYTHONPATH="$PYPATH" python3 -m pytest tests/cover PYTHONPATH="$PYPATH" python3 -m pytest tests/py3 PYTHONPATH="$PYPATH" python3 -m pytest tests/datetime PYTHONPATH="$PYPATH" python3 -m pytest tests/numpy } package() { python3 setup.py install --prefix=/usr --root="$pkgdir" } sha512sums="301076674a0751d052f3df6a03f6d6ac8c9288e1f6a6dcce998153cd93129228749e5d89679dc02fb25d581ccc2678b49489ea416754c551993355cf1ec76b0f py-hypothesis-4.36.2.tar.gz"