diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-20 15:21:12 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-20 15:21:12 -0300 |
commit | d976ab3a9c5c1e4c84c5169f6fff533dae8e8f0e (patch) | |
tree | 76b88c0f3ada852c2374935c683b92a9243f9e62 /testing/py3-django-rest-framework | |
parent | 542b2d4af4decf39bbd928692c56bb6e542461e5 (diff) | |
download | aports-d976ab3a9c5c1e4c84c5169f6fff533dae8e8f0e.tar.bz2 aports-d976ab3a9c5c1e4c84c5169f6fff533dae8e8f0e.tar.xz |
testing/py3-django-rest-framework: rename from py-django-rest-framework
Diffstat (limited to 'testing/py3-django-rest-framework')
-rw-r--r-- | testing/py3-django-rest-framework/APKBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/py3-django-rest-framework/APKBUILD b/testing/py3-django-rest-framework/APKBUILD new file mode 100644 index 0000000000..15f6197f2d --- /dev/null +++ b/testing/py3-django-rest-framework/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Leonardo Arena <rnalrd@alpinelinux.org> +# Maintainer: +pkgname=py-django-rest-framework +pkgver=3.8.2 +pkgrel=1 +pkgdesc="Web APIs for Django" +url="https://github.com/encode/django-rest-framework" +arch="noarch" +license="Custom" +depends="py-django" +makedepends="python2-dev python3-dev py2-setuptools" +checkdepends="pytest py-tz py-core-api py-jinja2 py-uritemplate" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +options="!check" # fails with "OperationalError: no such table: tests_blog" +source="$pkgname-$pkgver.tar.gz::https://github.com/encode/django-rest-framework/archive/$pkgver.tar.gz" +builddir="$srcdir"/django-rest-framework-$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.py + python3 runtests.py +} + +_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="603c86a4741a37a22a2be273136eb4d1eaa0a07aa24ba97b67f9f8d4e7fa254fe9ca7d1fdd44ee9237e86ef4cfe6bdbc8f48954a92f91873c9ef0761813a43d2 py-django-rest-framework-3.8.2.tar.gz" |