diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-04-03 16:27:11 -0400 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2019-04-05 11:55:30 +0000 |
commit | bc6704f10c8fcd74aac5c8d643b0fbc5623261ab (patch) | |
tree | e32acbd8cac9bbfecffdae50521e4c33e1c2336b /main | |
parent | 56095828ba0c36b2c66daf34d3c76ac8517d47d3 (diff) | |
download | aports-bc6704f10c8fcd74aac5c8d643b0fbc5623261ab.tar.bz2 aports-bc6704f10c8fcd74aac5c8d643b0fbc5623261ab.tar.xz |
main/py-hypothesis: adopt, normalize APKBUILD
Note that the old APKBUILD did not actually run any tests, but the fixed
check() runs into tests which appear to be broken upstream.
Diffstat (limited to 'main')
-rw-r--r-- | main/py-hypothesis/APKBUILD | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/main/py-hypothesis/APKBUILD b/main/py-hypothesis/APKBUILD index 783aaab202..06adfb4eab 100644 --- a/main/py-hypothesis/APKBUILD +++ b/main/py-hypothesis/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +# Maintainer: Drew DeVault <sir@cmpwn.com> pkgname=py-hypothesis pkgver=4.14.3 pkgrel=0 @@ -6,46 +6,57 @@ pkgdesc="Advanced property-based (QuickCheck-like) testing for Python" url="http://hypothesis.works/" arch="noarch" license="MPL-2.0" -depends="py-coverage" _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-hypothesis:_py py3-hypothesis:_py" +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" - python2 setup.py build python3 setup.py build + cd "$builddir"-py2 + python2 setup.py build } check() { cd "$builddir" - python2 setup.py check - python3 setup.py check + 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" - python2 setup.py install --prefix=/usr --root="$pkgdir" - python3 setup.py install --prefix=/usr --root="$pkgdir" + _py python3 } _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/ + _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" |