diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-20 08:42:20 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-21 10:37:29 +0000 |
commit | 6c915dc3cc50bf17f1acdc616300214259ee5f0c (patch) | |
tree | b9f66dda6ecc3643eb417df9b10af990539f9e1e | |
parent | 3e349e0670ed3255aa6f2c249722ab0df13bda78 (diff) | |
download | aports-6c915dc3cc50bf17f1acdc616300214259ee5f0c.tar.bz2 aports-6c915dc3cc50bf17f1acdc616300214259ee5f0c.tar.xz |
testing/py-django-debug-toolbar: new aport
-rw-r--r-- | testing/py-django-debug-toolbar/APKBUILD | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/testing/py-django-debug-toolbar/APKBUILD b/testing/py-django-debug-toolbar/APKBUILD new file mode 100644 index 0000000000..92b0d32d93 --- /dev/null +++ b/testing/py-django-debug-toolbar/APKBUILD @@ -0,0 +1,55 @@ +# Contributor: Leonardo Arena <rnalrd@alpinelinux.org> +# Maintainer: +pkgname=py-django-debug-toolbar +pkgver=1.9.1 +pkgrel=0 +pkgdesc="Configurable set of panels that display various debug information about the current request/response" +url="https://github.com/jazzband/django-debug-toolbar" +arch="noarch" +license="BSD3" +depends="py-django py-sqlparse" +makedepends="python2-dev python3-dev py-setuptools" +options="!check" #no testsuite +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$pkgname-$pkgver.tar.gz::https://github.com/jazzband/django-debug-toolbar/archive/$pkgver.tar.gz" +builddir="$srcdir"/django-debug-toolbar-$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 tests.py + python3 tests.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="8c3b51ad0e60b152dff8527be3f902f3f95140abc2e4f09a93740d83ec06cb1f3917119874fbd9a62c33d996cb09483a80ae6e71da623794e10a0c98f7b78ed0 py-django-debug-toolbar-1.9.1.tar.gz" |