aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-drf-yasg/APKBUILD
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-07 14:32:19 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-07 15:12:21 -0300
commitaa6b18ab6d13e89262feb581a4f450b268820812 (patch)
tree89164bdf9032c3520ce9c3c357246c4fb24ddb25 /testing/py3-drf-yasg/APKBUILD
parent65a41f708efa8eb76484e94a796675de95420abc (diff)
downloadaports-aa6b18ab6d13e89262feb581a4f450b268820812.tar.bz2
aports-aa6b18ab6d13e89262feb581a4f450b268820812.tar.xz
testing/py3-drf-yasg: rename from py-drf-yasg
Diffstat (limited to 'testing/py3-drf-yasg/APKBUILD')
-rw-r--r--testing/py3-drf-yasg/APKBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/py3-drf-yasg/APKBUILD b/testing/py3-drf-yasg/APKBUILD
new file mode 100644
index 0000000000..7010cbf275
--- /dev/null
+++ b/testing/py3-drf-yasg/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=py-drf-yasg
+pkgver=1.12.1
+pkgrel=1
+pkgdesc="Automated generation of real Swagger/OpenAPI 2.0 schemas from Django Rest Framework code"
+url="https://pypi.org/project/drf-yasg/"
+arch="noarch"
+license="BSD-3-Clause"
+depends="py-django"
+makedepends="python2-dev python3-dev py2-setuptools py3-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+options="!check" # no test suite
+source="$pkgname-$pkgver.tar.gz::https://github.com/axnsan12/drf-yasg/archive/$pkgver.tar.gz"
+builddir="$srcdir"/drf-yasg-$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"
+}
+
+
+sha512sums="096bda87ab8fae3ed2ccd1449ded37b06ebd368154fef834467ee21b7c3612e70712e4c6f1a970ff1fee89e8ae9afc46215437e1095778cced88de1b9062319d py-drf-yasg-1.12.1.tar.gz"