aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.eu>2018-07-01 14:28:24 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2018-08-16 20:47:45 +0000
commitf0d04082dfafa09d3512bfab85f371578fc5caa5 (patch)
treec54a576ea79900c5c6e2023887f4341904a16d7d
parent802ebae0b8449fdc6e5c152143362c530353a92b (diff)
downloadaports-f0d04082dfafa09d3512bfab85f371578fc5caa5.tar.bz2
aports-f0d04082dfafa09d3512bfab85f371578fc5caa5.tar.xz
testing/pytest-cov: new aport
-rw-r--r--testing/pytest-cov/APKBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/pytest-cov/APKBUILD b/testing/pytest-cov/APKBUILD
new file mode 100644
index 0000000000..7832c8182a
--- /dev/null
+++ b/testing/pytest-cov/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: TBK <alpine@jjtc.eu>
+# Maintainer: TBK <alpine@jjtc.eu>
+pkgname=pytest-cov
+_pkgname=${pkgname#py-}
+pkgver=2.5.1
+pkgrel=0
+pkgdesc="Pytest plugin for measuring coverage."
+url="https://github.com/pytest-dev/pytest-cov"
+arch="noarch"
+license="MIT"
+depends="pytest py-coverage"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+source="$pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-cov/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py test
+ python3 setup.py test
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python=$1
+ pkgdesc="$pkgdesc - $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+sha512sums="4963eba62ae8e7c1a03eb3310c242b6c24c9e711345b3b4c85902a4a1ba74e1c22ebb38dd4c0ddd42d4d8fc12eb22dd3a4d99f392c424bfba0c50b4564bc444f pytest-cov-2.5.1.tar.gz"