aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-hypothesis
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2019-04-05 12:07:24 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-04-05 12:07:24 +0000
commit94dce9db0b1b9f66db0971d179f166595108b61a (patch)
tree817b7d0b9be1022182033dea104747f5210d393b /community/py-hypothesis
parent9734d77ec9c4ea473e8af9f4a51664c9b517a4d9 (diff)
downloadaports-94dce9db0b1b9f66db0971d179f166595108b61a.tar.bz2
aports-94dce9db0b1b9f66db0971d179f166595108b61a.tar.xz
community/py-hypothesis: moved from main
Diffstat (limited to 'community/py-hypothesis')
-rw-r--r--community/py-hypothesis/APKBUILD62
1 files changed, 62 insertions, 0 deletions
diff --git a/community/py-hypothesis/APKBUILD b/community/py-hypothesis/APKBUILD
new file mode 100644
index 0000000000..06adfb4eab
--- /dev/null
+++ b/community/py-hypothesis/APKBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+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"