blob: 912bf9b832a9ab9a68cea1027ea0b64e5b5f9c97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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"
|