aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-07-19 08:53:07 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-07-19 09:29:42 +0000
commit62e2e52002986d8e8f88e0683be0756ee801906e (patch)
treeed82d556d7288ad1244e2393052786fc920aabf3 /testing
parentb615c9b7b53a8287bce2d11491252acc490cd8ee (diff)
downloadaports-62e2e52002986d8e8f88e0683be0756ee801906e.tar.bz2
aports-62e2e52002986d8e8f88e0683be0756ee801906e.tar.xz
testing/py-termcolor: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/py-termcolor/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/py-termcolor/APKBUILD b/testing/py-termcolor/APKBUILD
new file mode 100644
index 0000000000..84e5436f44
--- /dev/null
+++ b/testing/py-termcolor/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=py-termcolor
+_pkgname=termcolor
+_pyid=a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981
+pkgver=1.1.0
+pkgrel=0
+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://pypi.python.org/packages/8a/48/$_pyid/$_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"