diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-09 01:51:07 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-12-27 10:30:30 +0200 |
commit | a1d5aa0a4d3119c697a2a22592965f10562b9e66 (patch) | |
tree | 3dae49202507c5b0485e9aabe3339ff3ae077e1a /testing/py-colorama | |
parent | a75a1da76928f88a4cdcaddd934d71f92cbdb542 (diff) | |
download | aports-a1d5aa0a4d3119c697a2a22592965f10562b9e66.tar.bz2 aports-a1d5aa0a4d3119c697a2a22592965f10562b9e66.tar.xz |
testing/py-colorama: more standard python packaging
Diffstat (limited to 'testing/py-colorama')
-rw-r--r-- | testing/py-colorama/APKBUILD | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/testing/py-colorama/APKBUILD b/testing/py-colorama/APKBUILD index 696aeae921..7fe20d5766 100644 --- a/testing/py-colorama/APKBUILD +++ b/testing/py-colorama/APKBUILD @@ -1,45 +1,45 @@ -# Maintainer: Valery Kartel <valery.kartel@gmail.com> -# Contributor: Valery Kartel <valery.kartel@gmail.com> +# Contributor: Fabian Affolter <fabian@affolter-engineering.ch> +# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-colorama +_pkgname=colorama pkgver=0.3.7 -pkgrel=0 -_python="2 3" -_pyname=${pkgname#py-} -pkgdesc="Cross-platform colored terminal text" -url="https://pypi.python.org/pypi/colorama" +pkgrel=1 +pkgdesc="Simple cross-platform colored terminal text" +url="http://www.cherrypy.org" arch="noarch" license="BSD" -depends="" -depends_dev="" -makedepends="py-setuptools" -install="" -subpackages="" -source="https://files.pythonhosted.org/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz" -for v in $_python; do - makedepends="$makedepends python$v-dev" - subpackages="$subpackages py$v-$_pyname:package" -done -builddir="$srcdir"/$_pyname-$pkgver +makedepends="python2-dev python3-dev py-setuptools" +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" - for v in $_python; do - python$v setup.py build || return 1 - done + python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - local v=${subpkgname:2:1} - if [ "$v" ]; then - cd "$builddir" - pkgdesc="$pkgdesc (for python$v)" - depends="$depends python$v" - [ "$v" == "2" ] && replaces=$pkgname - install_if="$pkgname=$pkgver-r$pkgrel python$v" - python$v setup.py install --prefix=/usr --root="$subpkgdir" || return 1 - else - mkdir -p "$pkgdir" - fi + 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" } md5sums="349d2b02618d3d39e5c6aede36fe3c1a colorama-0.3.7.tar.gz" |