diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2018-04-12 15:45:13 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2018-04-12 15:45:13 +0000 |
commit | 2a9f0f83c324c49da3feae78afbc72854de73a2f (patch) | |
tree | 12bd4717c9c41a3c6df06ebc5c4ad7051dae23d0 /community/py-polib | |
parent | 96d6f951c7d22878e4441d0a1a89b39cd5f1900f (diff) | |
download | aports-2a9f0f83c324c49da3feae78afbc72854de73a2f.tar.bz2 aports-2a9f0f83c324c49da3feae78afbc72854de73a2f.tar.xz |
community/py-polib: upgrade to 1.1.0, added py2/py3 subpackage
Diffstat (limited to 'community/py-polib')
-rw-r--r-- | community/py-polib/APKBUILD | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/community/py-polib/APKBUILD b/community/py-polib/APKBUILD index 26a8a74b80..d0bbe50618 100644 --- a/community/py-polib/APKBUILD +++ b/community/py-polib/APKBUILD @@ -2,14 +2,14 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-polib _pkgname=polib -pkgver=1.0.8 +pkgver=1.1.0 pkgrel=0 pkgdesc="A library to manipulate gettext files" url="http://polib.readthedocs.org/en/latest/index.html" arch="noarch" license="MIT" -depends="python2" -makedepends="python2-dev" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" @@ -17,11 +17,36 @@ builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check } package() { + mkdir -p "$pkgdir" +} + +_py() { + local python=$1 + pkgdesc="$pkgdesc (for $python)" + depends="$python libmagic" + install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 } -sha512sums="6bcb8404a06e4e41e827ff947d13ea3165b7dbf0cd3f3f58c74ac1b49718a5d81f1a0ca0e59180928610b5eaefcc248aad9b8ca033978f580c141cd52405dc3f polib-1.0.8.tar.gz" +sha512sums="74681585b4d7252e107acd7d73f49f7e91c90adcd180722d39d35c40ec158434798af0124a16788cf564c73b84f52a040aefeb58355a1a3cd85848c3f6a5e67f polib-1.1.0.tar.gz" |