diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-20 08:52:57 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-30 12:52:07 +0000 |
commit | b3f9e7f5067bc690ed5d35083610e20157696bf7 (patch) | |
tree | 84d5eb43516411aa94b45179ed56946a7cac22bf | |
parent | 657b218b3651a34d6ebc29662027085b8e148bf7 (diff) | |
download | aports-b3f9e7f5067bc690ed5d35083610e20157696bf7.tar.bz2 aports-b3f9e7f5067bc690ed5d35083610e20157696bf7.tar.xz |
testing/py-django-filter: new aport
-rw-r--r-- | testing/py-django-filter/APKBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/py-django-filter/APKBUILD b/testing/py-django-filter/APKBUILD new file mode 100644 index 0000000000..286ec920bc --- /dev/null +++ b/testing/py-django-filter/APKBUILD @@ -0,0 +1,58 @@ +# 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" |