diff options
Diffstat (limited to 'testing/py3-drf-yasg')
-rw-r--r-- | testing/py3-drf-yasg/APKBUILD | 50 |
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" |