From bf9d181f3de29031973b61ebea07586c3139588c Mon Sep 17 00:00:00 2001 From: Francesco Colista Date: Tue, 23 Aug 2016 10:47:14 +0000 Subject: community/py-termcolor: moved from testing --- community/py-termcolor/APKBUILD | 52 +++++++++++++++++++++++++++++++++++++++++ testing/py-termcolor/APKBUILD | 52 ----------------------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) create mode 100644 community/py-termcolor/APKBUILD delete mode 100644 testing/py-termcolor/APKBUILD 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 +# Maintainer: Francesco Colista +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" diff --git a/testing/py-termcolor/APKBUILD b/testing/py-termcolor/APKBUILD deleted file mode 100644 index bffc156ad1..0000000000 --- a/testing/py-termcolor/APKBUILD +++ /dev/null @@ -1,52 +0,0 @@ -# Contributor: Francesco Colista -# Maintainer: Francesco Colista -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" -- cgit v1.2.3