1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 20:25:28 +03:00
aports/community/py3-hypothesis/APKBUILD

46 lines
1.7 KiB
Text

# Contributor: Drew DeVault <sir@cmpwn.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=py3-hypothesis
pkgver=4.43.1
pkgrel=0
pkgrel=1
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 py3-pexpect"
source="py-hypothesis-$pkgver.tar.gz::https://github.com/HypothesisWorks/hypothesis-python/archive/hypothesis-python-$pkgver.tar.gz
attrs.patch
"
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="fb0946f086dff849d02a2dddfd34bae0b6d746c10194ae8ff51dae134b2bdee454e2bb8c645899e6a3f500954279639f8a344147d43b07524c87a574fef82ad6 py-hypothesis-4.43.1.tar.gz
9ef9fd9f7076586221f79b677c05139188c6d7c37fbbddfdf28dd4a6ca18b36457d3481ee716fb11a2a84f2db0d53105be880b92ec09d8bfbb63f8b5323dab27 attrs.patch"