aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-pexpect/APKBUILD
blob: 042c2e5e4e80e2d986d9a44e18442c8f3c34480e (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-pexpect
_pkgname=${pkgname#py-}
pkgver=4.2.1
pkgrel=1
pkgdesc="Make Python a better tool for controlling and automating other programs"
url="http://pexpect.readthedocs.org/en/stable"
arch="noarch"
license="MIT"
depends=""
makedepends="python2-dev python3-dev py-setuptools"
subpackages="$pkgname-doc py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="$pkgname-$pkgver.tar.gz::https://github.com/pexpect/$_pkgname/archive/$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"
	mkdir -p "$pkgdir"
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

_py() {
	local python=$1
	pkgdesc="$pkgdesc - $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"
	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

_py2() {
	_py python2
	depends="py-ptyprocess"
	replaces="$pkgname"
}

_py3() {
	_py python3
	depends="py3-ptyprocess"
}


md5sums="8ed1182f51b655c74a1bfd6bd5213210  py-pexpect-4.2.1.tar.gz"
sha256sums="f3e36792185a7b8b332a38846daa81d7e389688b7b63b9066d39c7f31a266a51  py-pexpect-4.2.1.tar.gz"
sha512sums="30da69e18690f00522bd2514248b1d5613e96c2737435f6b47d30389f6acfc580511db2f89e34c8932f3af32cc61b55fb6dc19f02330c3e1e5be5417c22ebdd1  py-pexpect-4.2.1.tar.gz"