diff options
-rw-r--r-- | main/py-gunicorn/APKBUILD | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/main/py-gunicorn/APKBUILD b/main/py-gunicorn/APKBUILD index e87a65b449..f48a60a0b8 100644 --- a/main/py-gunicorn/APKBUILD +++ b/main/py-gunicorn/APKBUILD @@ -3,34 +3,45 @@ _pkgname=gunicorn pkgname=py-${_pkgname} pkgver=19.7.1 -pkgrel=0 +pkgrel=1 pkgdesc="a Python WSGI HTTP Server" url="https://github.com/benoitc/gunicorn/" arch="noarch" license="BSD" -makedepends="python2-dev py-setuptools" +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}" +builddir="${srcdir}/${_pkgname}-${pkgver}" -prepare() { - local pf - cd "${_builddir}" - for pf in $source; do - case $pf in - *.patch) msg $pf; patch -p1 -i "$srcdir"/${pf} || return 1;; - esac - done +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build } -build() { - cd "${_builddir}" - python2 setup.py build || return 1 +_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() { - cd "${_builddir}" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +py2() { + cd "$builddir" + _py python2 +} + +py3() { + cd "$builddir" + _py python3 } sha512sums="d06862016937f11064c0d08f2eceb262a4cdecf876f02a0c722e8ff61c439da27890dee78e20b4aeddac9db12b3e04233f16eb320e85c56b70ac2f332433cc14 py-gunicorn-19.7.1.tar.gz" |