aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-gunicorn/APKBUILD
blob: f48a60a0b8f43cb8634182b4b929d98ccf84d16d (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
# Contributor: <xmingske@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_pkgname=gunicorn
pkgname=py-${_pkgname}
pkgver=19.7.1
pkgrel=1
pkgdesc="a Python WSGI HTTP Server"
url="https://github.com/benoitc/gunicorn/"
arch="noarch"
license="BSD"
subpackages="py2-gunicorn:py2 py3-gunicorn:py3"
makedepends="python2-dev python3-dev py-setuptools"
source="$pkgname-$pkgver.tar.gz::https://github.com/benoitc/$_pkgname/archive/${pkgver}.tar.gz"

builddir="${srcdir}/${_pkgname}-${pkgver}"

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

_py() {
        local python="$1"
        pkgdesc="$pkgdesc ${python#python}"
        depends="$depends $python"
        install_if="$pkgname=$pkgver-r$pkgrel $python"

        cd "$builddir"
        $python setup.py install --prefix=/usr --root="$subpkgdir"
}

package() {
	mkdir -p "$pkgdir"
}

py2() {
	cd "$builddir"
	_py python2
}

py3() {
	cd "$builddir"
	_py python3
}

sha512sums="d06862016937f11064c0d08f2eceb262a4cdecf876f02a0c722e8ff61c439da27890dee78e20b4aeddac9db12b3e04233f16eb320e85c56b70ac2f332433cc14  py-gunicorn-19.7.1.tar.gz"