aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-drf-yasg
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2018-08-22 13:10:19 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-08-22 13:11:34 +0000
commitd6448aac69fc77616548d796f225206580ea3e1a (patch)
tree20914b5fb3eb11ac566d3009aef10496de351f21 /testing/py-drf-yasg
parent2c06ae990d304440b91441db5981ee5f30635da3 (diff)
downloadaports-d6448aac69fc77616548d796f225206580ea3e1a.tar.bz2
aports-d6448aac69fc77616548d796f225206580ea3e1a.tar.xz
testing/py-drf-yasg: new aport
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code
Diffstat (limited to 'testing/py-drf-yasg')
-rw-r--r--testing/py-drf-yasg/APKBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/testing/py-drf-yasg/APKBUILD b/testing/py-drf-yasg/APKBUILD
new file mode 100644
index 0000000000..ac1a37f779
--- /dev/null
+++ b/testing/py-drf-yasg/APKBUILD
@@ -0,0 +1,50 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=py-drf-yasg
+pkgver=1.10.0
+pkgrel=0
+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"
+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="c1b15f1e094ae35dc58aff6407eb3f14a419c7aba21193e8b1ac33575e03e38841814eeb9d5179747cf0856141c3bf48f839c0da7823731b69bb9c54834cd70d py-drf-yasg-1.10.0.tar.gz"