aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-hypothesis
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-11-20 10:15:25 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-11-20 11:29:20 +0000
commit5227e5fda8985a073ffbbe796f0114b44fde98e5 (patch)
tree65c181c3d1900ecec380ccbb7a56f31c54fc8577 /testing/py-hypothesis
parentd25f3dea63e76dee533912410418df6306208bb9 (diff)
downloadaports-5227e5fda8985a073ffbbe796f0114b44fde98e5.tar.bz2
aports-5227e5fda8985a073ffbbe796f0114b44fde98e5.tar.xz
testing/py-hypothesis: new apkbuild
Advanced property-based (QuickCheck-like) testing for Python http://hypothesis.works/
Diffstat (limited to 'testing/py-hypothesis')
-rw-r--r--testing/py-hypothesis/APKBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/testing/py-hypothesis/APKBUILD b/testing/py-hypothesis/APKBUILD
new file mode 100644
index 0000000000..fb77abeb43
--- /dev/null
+++ b/testing/py-hypothesis/APKBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=py-hypothesis
+pkgver=3.38.0
+pkgrel=1
+pkgdesc="Advanced property-based (QuickCheck-like) testing for Python"
+url="http://hypothesis.works/"
+arch="noarch"
+license="MPLv2.0"
+depends=""
+makedepends="py-setuptools python2-dev python3-dev py-enum34"
+install=""
+subpackages="py2-hypothesis:_py py3-hypothesis:_py"
+source="py-hypothesis-$pkgver.tar.gz::https://github.com/HypothesisWorks/hypothesis-python/archive/$pkgver.tar.gz"
+builddir="$srcdir/hypothesis-python-$pkgver"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py check
+ python3 setup.py check
+}
+
+package() {
+ cd "$builddir"
+ python2 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+_py() {
+ local py=${subpkgname%%-*}
+ local python="python${py#py}"
+ depends="$python"
+ case $py in
+ py2) depends="$depends py-enum34";;
+ esac
+ pkgdesc="$pkgdesc ($python)"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/${python}* "$subpkgdir"/usr/lib/
+}
+
+sha512sums="9001b045013f720885e53649c9445ac12c149e609b2532fc52ed2b4743aad59a2a59d6775988f65a23b58983a726849d75c368d291662c4b1d62e5d769efe88e py-hypothesis-3.38.0.tar.gz"