blob: 2dd137f9cb36341b343d7ddd8e30b3d83e81936f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-termcolor
_pkgname=termcolor
pkgver=1.1.0
pkgrel=2
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"
|