X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail.cmpwn.com (mail.cmpwn.com [45.56.77.53]) by lists.alpinelinux.org (Postfix) with ESMTP id 87C58F85627 for ; Wed, 3 Apr 2019 20:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1554323416; bh=7XS+V5UTanle1/un1gfzff9thm88ZYOzCAT/xv4sWB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Fjk2EEip0JzhPJLoVaTDS3mqVh3AfdvYdFXdrtEoOgbQ1FqQ438/poH77K+gUaZIL 38yhNmgYCEGhwDQqd2xvEjt/fKyiuZxDFcF6kZTwwA1bg1WCyWsGSG4ZdkPnDgVSLD QlppGQx3RN3oK6HbUmtuAdaRlAdc5meD22dYGQTI= From: Drew DeVault To: alpine-aports@lists.alpinelinux.org Cc: Drew DeVault Subject: [alpine-aports] [PATCH 08/12] py-hypothesis: adopt, normalize APKBUILD Date: Wed, 3 Apr 2019 16:27:11 -0400 Message-Id: <20190403202715.15694-9-sir@cmpwn.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190403202715.15694-1-sir@cmpwn.com> References: <20190403202715.15694-1-sir@cmpwn.com> X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Note that the old APKBUILD did not actually run any tests, but the fixed check() runs into tests which appear to be broken upstream. --- main/py-hypothesis/APKBUILD | 47 +++++++++++++++++++++++-------------- 1 file 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 +# Maintainer: Drew DeVault 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" -- 2.21.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---