diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-20 17:18:50 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-20 17:18:50 -0300 |
commit | 5c75418589681eba4be9c99b6d5dbdbbcd8a2342 (patch) | |
tree | 90a0ed971d48bc661278894c1781958127689857 /testing/py3-django-cors-headers/APKBUILD | |
parent | df27a6ce54557def60f82cb6d258c4fcb0a84a15 (diff) | |
download | aports-5c75418589681eba4be9c99b6d5dbdbbcd8a2342.tar.bz2 aports-5c75418589681eba4be9c99b6d5dbdbbcd8a2342.tar.xz |
testing/py3-django-cors-headers: rename from py-django-cors-headers
Diffstat (limited to 'testing/py3-django-cors-headers/APKBUILD')
-rw-r--r-- | testing/py3-django-cors-headers/APKBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/py3-django-cors-headers/APKBUILD b/testing/py3-django-cors-headers/APKBUILD new file mode 100644 index 0000000000..4570865544 --- /dev/null +++ b/testing/py3-django-cors-headers/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Leonardo Arena <rnalrd@alpinelinux.org> +# Maintainer: +pkgname=py-django-cors-headers +pkgver=2.4.0 +pkgrel=1 +pkgdesc="Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)" +url="https://github.com/OttoYiu/django-cors-headers" +arch="noarch" +license="Custom" +depends="py-django" +makedepends="python2-dev python3-dev py-setuptools" +checkdepends="py-django py-tz py-mock pytest" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +options="!check" # FIXME: fail +source="$pkgname-$pkgver.tar.gz::https://github.com/ottoyiu/django-cors-headers/archive/$pkgver.tar.gz" +builddir="$srcdir"/django-cors-headers-$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 ./tests + python3 runtests.py ./tests +} + +_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="97f12655b0f499e62fbee6b506703fe9a43988f5d5ab275eb16ce8429c221fab6f8c50670357b33f218686490ae1a54527743a32d3a796c333dcb6328db4b94e py-django-cors-headers-2.4.0.tar.gz" |