Commit b3f9e7f5 authored by Leonardo Arena's avatar Leonardo Arena

testing/py-django-filter: new aport

parent 657b218b
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=py-django-filter
pkgver=2.0.0p1
_pkgver=${pkgver/p/.dev}
pkgrel=0
pkgdesc="Generic system for filtering Django QuerySets based on user selections"
url="https://github.com/carltongibson/django-filter"
arch="noarch"
license="Custom"
depends="py-django"
makedepends="python2-dev python3-dev py2-setuptools"
#checkdepends="py-tz py-django-rest-framework py-mock py-django-crispy-forms"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
options="!check" # FIXME currently fails with "syntax error" in filterset.py
source="$pkgname-$pkgver.tar.gz::https://github.com/carltongibson/django-filter/archive/$_pkgver.tar.gz"
builddir="$srcdir"/django-filter-$_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="97af833ce2e3817c3d952b6bfe3d6d1dbc5704472d89b09875f9953a11aecb0a2fdef7b6dacab8a701e35ec8a5cc5eafd21ce4d8e1548bfa94a3907471f45f01 py-django-filter-2.0.0p1.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