mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 05:17:07 +02:00
testing/py-django-cors-headers: new aport
This commit is contained in:
parent
725fe04b24
commit
8036338579
55
testing/py-django-cors-headers/APKBUILD
Normal file
55
testing/py-django-cors-headers/APKBUILD
Normal file
@ -0,0 +1,55 @@
|
||||
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
|
||||
# Maintainer:
|
||||
pkgname=py-django-cors-headers
|
||||
pkgver=1.2.0
|
||||
pkgrel=0
|
||||
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"
|
||||
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
|
||||
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 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="0f6bfef73cc007a4a322e266433d7053e4d897212183be82e0e201786ba0e5dfe802771879c83c61b8a2044ac4003b0aec3080c358033a2c8f24d341641acadf py-django-cors-headers-1.2.0.tar.gz"
|
Loading…
Reference in New Issue
Block a user