aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-django-filter
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-20 15:13:14 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-20 15:13:14 -0300
commitf06a8a567d0f90b87827e7a10da5c170a44770f1 (patch)
tree1d1d8a8383c6aa45f1869a689089f91e2dd7aa93 /testing/py3-django-filter
parent7d2ebbc383ed3472e0c032ac285d5e72bc3eb470 (diff)
testing/py3-django-filter: rename from py-django-filter
Diffstat (limited to 'testing/py3-django-filter')
-rw-r--r--testing/py3-django-filter/APKBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/testing/py3-django-filter/APKBUILD b/testing/py3-django-filter/APKBUILD
new file mode 100644
index 00000000000..d4b80535b9c
--- /dev/null
+++ b/testing/py3-django-filter/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer:
+pkgname=py-django-filter
+pkgver=2.0.0
+pkgrel=1
+pkgdesc="Generic system for filtering Django QuerySets based on user selections"
+url="https://github.com/carltongibson/django-filter"
+arch="noarch"
+license="BSD-3-Clause"
+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="48a2741e1f15eb756cdba7575943401fc211b398cf91d40cad4159d44fbd2303449bddc7cd791bf7857506bc98a4e9ff2143ed29781b9a884b2d6f35cceaf4a0 py-django-filter-2.0.0.tar.gz"