paraports

parazyd's aports
git clone https://git.parazyd.org/paraports
Log | Files | Refs | README | LICENSE

commit 6abf6fdf6c5b0bc76910af4cf21bf75d1210ac2a
parent 9059a8a7d7b0ea32e6c8a598f09066d117b1f44e
Author: parazyd <parazyd@dyne.org>
Date:   Wed,  3 Jul 2019 19:57:40 +0200

Add py-sh.

Diffstat:
Apy-sh/APKBUILD | 46++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+), 0 deletions(-)

diff --git a/py-sh/APKBUILD b/py-sh/APKBUILD @@ -0,0 +1,46 @@ +# Maintainer: Ivan J. <parazyd@dyne.org> +pkgname=py-sh +_pkgname=sh +pkgver=1.12.14 +pkgrel=0 +pkgdesc="Python subprocess replacement" +url="https://amoffat.github.io/sh/" +arch="noarch" +license="MIT" +depends="" +makedepends="python2-dev python3-dev py-setuptools http-parser-dev libev-dev" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + + python2 setup.py build || return 1 + python3 setup.py build || return 1 +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +sha512sums="5f2daa2666cf8efe90ba550c8ea5875f2a8812d787597c9d9b933f58feccd192e1ec0ab5695b756bdbfbf9748d106c2045be20838e680b31dac3f778970b5786 sh-1.12.14.tar.gz"