diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-23 10:47:14 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-08-23 10:47:14 +0000 |
commit | bf9d181f3de29031973b61ebea07586c3139588c (patch) | |
tree | c9b76e558b2ab7ed146d250f71291173742c9f03 /community/py-termcolor | |
parent | f4c2d836dd6c3ba8beb17b8f4231102080993bc1 (diff) | |
download | aports-bf9d181f3de29031973b61ebea07586c3139588c.tar.bz2 aports-bf9d181f3de29031973b61ebea07586c3139588c.tar.xz |
community/py-termcolor: moved from testing
Diffstat (limited to 'community/py-termcolor')
-rw-r--r-- | community/py-termcolor/APKBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/community/py-termcolor/APKBUILD b/community/py-termcolor/APKBUILD new file mode 100644 index 0000000000..bffc156ad1 --- /dev/null +++ b/community/py-termcolor/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py-termcolor +_pkgname=termcolor +pkgver=1.1.0 +pkgrel=1 +pkgdesc="ANSII Color formatting for output in terminal." +url="http://pypi.python.org/pypi/termcolor" +arch="noarch" +license="MIT" +depends="" +makedepends="python2-dev python3-dev" +install="" +subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" +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() { + cd "$builddir" + python2 setup.py install --root=$pkgdir/ --optimize=1 || return 1 + python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1 +} + + +_py() { + local python=$1 + pkgdesc="$pkgdesc - $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))') + + mkdir -p "$subpkgdir"${dir} + mv "$pkgdir"${dir}/* "$subpkgdir"${dir} +} + +_py2() { + _py python2 +} + +_py3() { + _py python3 +} + + +md5sums="043e89644f8909d462fbbfa511c768df termcolor-1.1.0.tar.gz" +sha256sums="1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b termcolor-1.1.0.tar.gz" +sha512sums="4bd06bf4405a9ef6c005cd4d159ef602f7fc7fccb3e57586da1187c402f4d0b9051ef930cae423065c51ff4be8a22ceae556a61a6b3c8c519d623c066c340b53 termcolor-1.1.0.tar.gz" |