aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-drf-yasg/APKBUILD
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-07 14:34:20 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-07 15:12:21 -0300
commit28f37a31742bb536b88aca4fff68bcb66d8eca26 (patch)
tree95081333c6a6e3525a4cd8e6e0933344c1f75a3d /testing/py3-drf-yasg/APKBUILD
parentaa6b18ab6d13e89262feb581a4f450b268820812 (diff)
downloadaports-28f37a31742bb536b88aca4fff68bcb66d8eca26.tar.bz2
aports-28f37a31742bb536b88aca4fff68bcb66d8eca26.tar.xz
testing/py3-drf-yasg: drop py2
Diffstat (limited to 'testing/py3-drf-yasg/APKBUILD')
-rw-r--r--testing/py3-drf-yasg/APKBUILD47
1 files changed, 15 insertions, 32 deletions
diff --git a/testing/py3-drf-yasg/APKBUILD b/testing/py3-drf-yasg/APKBUILD
index 7010cbf275..a7dda90dff 100644
--- a/testing/py3-drf-yasg/APKBUILD
+++ b/testing/py3-drf-yasg/APKBUILD
@@ -1,50 +1,33 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
-pkgname=py-drf-yasg
+pkgname=py3-drf-yasg
pkgver=1.12.1
-pkgrel=1
+pkgrel=2
pkgdesc="Automated generation of real Swagger/OpenAPI 2.0 schemas from Django Rest Framework code"
+options="!check" # Missing dependencies
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"
+depends="py3-django py3-coreschema py3-ruamel.yaml py3-inflection
+ py3-six py3-uritemplate py3-coreapi"
+makedepends="py3-setuptools py3-setuptools_scm py3-pbr"
+# Requires unpackaged datadiff pytest-pythonpath pytest-django
+checkdepends="py3-pytest py3-pytest-cov py3-pytest-xdist"
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
+replaces="py-drf-yasg" # Backwards compatibility
+provides="py-drf-yasg=$pkgver-r$pkgrel" # Backwards compatibility
+
build() {
- cd "$builddir"
- python2 setup.py --quiet build
- python3 setup.py --quiet build
+ git init # Workaround
+ python3 setup.py 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"
+ python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
}
-sha512sums="096bda87ab8fae3ed2ccd1449ded37b06ebd368154fef834467ee21b7c3612e70712e4c6f1a970ff1fee89e8ae9afc46215437e1095778cced88de1b9062319d py-drf-yasg-1.12.1.tar.gz"
+sha512sums="096bda87ab8fae3ed2ccd1449ded37b06ebd368154fef834467ee21b7c3612e70712e4c6f1a970ff1fee89e8ae9afc46215437e1095778cced88de1b9062319d py3-drf-yasg-1.12.1.tar.gz"