aports/community/py3-hypothesis/APKBUILD
2024-05-18 01:38:22 +02:00

45 lines
1.5 KiB
Plaintext

# Contributor:
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-hypothesis
pkgver=6.102.4
pkgrel=0
pkgdesc="Advanced property-based (QuickCheck-like) testing for Python"
options="!check"
url="https://hypothesis.works/"
arch="noarch"
license="MPL-2.0"
depends="py3-attrs py3-sortedcontainers"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-coverage py3-tz py3-numpy py3-dateutil py3-pexpect"
subpackages="$pkgname-pyc"
source="$pkgname-$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() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
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
rm -rf tests/lark tests/dpcontracts tests/pandas
PYTHONPATH="$PWD/build/lib" pytest-3 -v -k "not test_healthcheck_traceback_is_hidden"
}
package() {
python3 -m installer -d "$pkgdir" .dist/*.whl
}
sha512sums="
5e758ec308ae8bbd11a0c715a537541de63ef74bba664f666031d4948cc186a7a450aea77eacbc970c97215f79eda89a85bb77b5cb878b27a5ac99fd053be1b6 py3-hypothesis-6.102.4.tar.gz
"