aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-04-03 16:27:07 -0400
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-04-05 11:55:29 +0000
commit7d4d545a4b78d458956eac18f19f2d03df0cb938 (patch)
tree9c36a061b62c62662b4b5a665a11f6a9a8cf94c3 /testing
parent004faadb804af1a5370ae5acbf58322c3df1f7b1 (diff)
testing/py-case: new APKBUILD
Diffstat (limited to 'testing')
-rw-r--r--testing/py-case/APKBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/testing/py-case/APKBUILD b/testing/py-case/APKBUILD
new file mode 100644
index 00000000000..ab206b9812c
--- /dev/null
+++ b/testing/py-case/APKBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py-case
+_pyname=case
+pkgver=1.5.0
+pkgrel=0
+pkgdesc="Python unittest utilities"
+url="https://github.com/celery/case/"
+arch="noarch"
+license="BSD"
+makedepends="python2-dev python3-dev py2-setuptools py3-setuptools"
+checkdepends="
+ py2-coverage py3-coverage py2-mock py3-mock py2-nose py3-nose py2-unittest2
+"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+_pypiprefix="${_pyname%${_pyname#?}}"
+source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
+builddir="$srcdir/$_pyname-$pkgver"
+
+prepare() {
+ cd "$builddir"
+ 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() {
+ cd "$builddir"-py2
+ _py python2
+}
+
+_py3() {
+ 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="0ae03ab175903bc55a81df9c1847587960bec64202be66702456b447c3114d8a9b49fa7bfa08cb032040bc2c1f17411642392abee617e4400fae0a9b67d38702 case-1.5.0.tar.gz"