aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-04-30 04:48:07 -0300
committerNatanael Copa <ncopa@alpinelinux.org>2019-05-01 06:49:06 +0000
commit83b26f5529260a0d54e1e95b5a3f8560a5b66698 (patch)
treea90a421be857102ffe4ec91e90b72685ae7457e2
parent9a2012dcf3a02e1fe9c7e673edbe94310b546270 (diff)
downloadaports-83b26f5529260a0d54e1e95b5a3f8560a5b66698.tar.bz2
aports-83b26f5529260a0d54e1e95b5a3f8560a5b66698.tar.xz
community/py-hypothesis: upgrade to 4.18.2
- Enable lots of tests - Use modern style
-rw-r--r--community/py-hypothesis/APKBUILD43
1 files changed, 28 insertions, 15 deletions
diff --git a/community/py-hypothesis/APKBUILD b/community/py-hypothesis/APKBUILD
index cc51ff7641..74c3fc169e 100644
--- a/community/py-hypothesis/APKBUILD
+++ b/community/py-hypothesis/APKBUILD
@@ -1,38 +1,51 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py-hypothesis
-pkgver=4.14.3
-pkgrel=1
+pkgver=4.18.2
+pkgrel=0
pkgdesc="Advanced property-based (QuickCheck-like) testing for Python"
-url="http://hypothesis.works/"
+url="https://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
-"
+_py2_deps="py2-attrs py-enum34"
+_py3_deps="py3-attrs"
+makedepends="$_py2_deps $_py3_deps py2-setuptools py3-setuptools"
+checkdepends="py2-coverage py2-pytest py2-tz py2-numpy py2-dateutil py2-mock
+ py3-pytest py3-coverage py3-tz py3-numpy py3-dateutil"
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
+ # 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
+ PY3PATH="${PWD}/build/lib"
+
+ PYTHONPATH="${PY3PATH}" python3 -m pytest tests/cover
+ PYTHONPATH="${PY3PATH}" python3 -m pytest tests/py3
+ PYTHONPATH="${PY3PATH}" python3 -m pytest tests/datetime
+ PYTHONPATH="${PY3PATH}" python3 -m pytest tests/numpy
+
cd "$builddir"-py2
- python2 setup.py test
+ PY2PATH="${PWD}/build/lib"
+ PYTHONPATH="${PY2PATH}" python2 -m pytest tests/cover
+ PYTHONPATH="${PY2PATH}" python2 -m pytest tests/py2
+ PYTHONPATH="${PY2PATH}" python2 -m pytest tests/numpy
+ PYTHONPATH="${PY2PATH}" python2 -m pytest tests/datetime
}
package() {
@@ -59,4 +72,4 @@ _py() {
$_python setup.py install --prefix=/usr --root="$subpkgdir"
}
-sha512sums="56f0a796741b1a46bfe91e578dc76067b612d0041dd8b93043521c8e53827a5bcdd815f94e91d22d4ae9d13125bfb9012cb1c4660635e7cc93472141be504efb py-hypothesis-4.14.3.tar.gz"
+sha512sums="80fac0d4c6671b2f917da79273309d3513b293b3dbba7990974baa3cad9f3a57e34ecb332209a7138810a9b4a814f1ceadde9789a7f44a634af5c2905cfdfa0d py-hypothesis-4.18.2.tar.gz"