aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-codecov
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-05 06:51:33 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-05 08:13:25 -0300
commit6c688b4e322208c307f892452385adef194110e3 (patch)
treeaa084efcfde5456838afc280d6463ea07021ff97 /testing/py3-codecov
parentb35f7704e9678d354fd02a296a587fe2b323bf20 (diff)
downloadaports-6c688b4e322208c307f892452385adef194110e3.tar.bz2
aports-6c688b4e322208c307f892452385adef194110e3.tar.xz
testing/py3-codecov: rename from py-codecov
Diffstat (limited to 'testing/py3-codecov')
-rw-r--r--testing/py3-codecov/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/py3-codecov/APKBUILD b/testing/py3-codecov/APKBUILD
new file mode 100644
index 0000000000..c7c9c55f89
--- /dev/null
+++ b/testing/py3-codecov/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=py-codecov
+pkgver=1.1.0
+pkgrel=2
+pkgdesc="Report uploader for Codecov"
+url="https://github.com/codecov/codecov-python"
+arch="noarch"
+license="Apache-2.0"
+depends=""
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+options="!check" #no testsuite
+source="$pkgname-$pkgver.tar.gz::https://github.com/codecov/codecov-python/archive/v$pkgver.tar.gz"
+builddir="$srcdir"/codecov-python-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py --quiet build
+ python3 setup.py --quiet build
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/bin
+}
+
+_py2() {
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ local pyver="${1:6:1}"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py --quiet install --prefix=/usr --root="$subpkgdir"
+ local file; for file in "$subpkgdir"/usr/bin/*; do
+ mv $file $file-$pyver
+ done
+}
+
+sha512sums="d113a64f668f5faaaa4b0871e532eb89632c2bebf5c443aa9519b6f58bebb5643ce77cff608ed75e0fa91e90ace182b46c32094ac424395caeaaf092d09fbe65 py-codecov-1.1.0.tar.gz"