Commit 6af4b41f authored by Leonardo Arena's avatar Leonardo Arena

testing/py-django-rest-framework: new aport

parent 5329d305
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=py-django-rest-framework
pkgver=3.7.3
pkgrel=0
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="a134d4ce8911530c1bffd7c8e5336100186df5fb8e5e06cc30b872c212a3012e259c85b44e7ea3294f3a80c00f8cb358e1d352f7b4fa0c69d7874e8afb05be7b py-django-rest-framework-3.7.3.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment