aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-core-api
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-20 15:25:01 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-20 15:25:01 -0300
commit6c1ac9b988ba781b592a6cab66cc4295e6625344 (patch)
treee47bb3bdf1bd9dcab543d16f70ff8ed0df822ebf /testing/py3-core-api
parent1513b283111a57348d5da89808589e5a80a0dfa9 (diff)
downloadaports-6c1ac9b988ba781b592a6cab66cc4295e6625344.tar.bz2
aports-6c1ac9b988ba781b592a6cab66cc4295e6625344.tar.xz
testing/py3-core-api: rename from py-core-api
Diffstat (limited to 'testing/py3-core-api')
-rw-r--r--testing/py3-core-api/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/py3-core-api/APKBUILD b/testing/py3-core-api/APKBUILD
new file mode 100644
index 0000000000..17212ce90b
--- /dev/null
+++ b/testing/py3-core-api/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=py-core-api
+_pkgname=python-client
+pkgver=2.3.3
+pkgrel=4
+pkgdesc="Python client library for Core API"
+url="https://github.com/core-api/python-client"
+arch="noarch"
+license="BSD-2-Clause"
+depends="py-coreschema py-itypes py-requests py-uritemplate"
+makedepends="python2-dev python3-dev py2-setuptools"
+#checkdepends="py-flake8 py-coverage pytest py-jinja2 py-pycodestyle
+# py-pyflakes py-enum34"
+options="!check" #currently requires pyflakes-1.5.0
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="$pkgname-$pkgver.tar.gz::https://github.com/core-api/python-client/archive/$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py --quiet build
+ python3 setup.py --quiet build
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/bin
+}
+
+check() {
+ cd "$builddir"
+ python2 runtests
+ python3 runtests
+}
+
+_py2() {
+ depends="${depends//py-/py3-}"
+ _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"
+}
+
+sha512sums="aeae3ace84c0ce61552236b83db28e47492f5ac17a0e216e1a8eeddaf67270b94127f7a40f8a37cc5051abe097555adfd690a7e6c8801524ca77c916bd451ab8 py-core-api-2.3.3.tar.gz"