aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-pyautogui/APKBUILD
blob: 3d31b05fb8a012bb9db71a6016875e59416afd36 (plain) (blame)
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
53
54
55
56
# Contributor: Ivan Tham <pickfire@riseup.net>
# Maintainer: Ivan Tham <pickfire@riseup.net>
pkgname=py-pyautogui
_pkgname=PyAutoGUI
pkgver=0.9.35
pkgrel=1
pkgdesc="A cross-platform Python module for GUI automation for human beings"
url="http://pyautogui.readthedocs.io/"
arch="noarch"
license="BSD"
depends="py-xlib py-pillow"
makedepends="python2-dev python3-dev py-setuptools xvfb"
subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://github.com/asweigart/pyautogui/archive/master.zip" # TODO: find a better source
builddir="$srcdir/pyautogui-master"

build() {
	cd "$builddir"
	Xvfb :1 &
	export DISPLAY=:1
	python2 setup.py build
	python3 setup.py build
}

check() {
	cd "$builddir"
	python2 setup.py check
	python3 setup.py check
}

package() {
	mkdir -p "$pkgdir"
}

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

_py3() {
	depends="${depends//py-/py3-}"
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

sha512sums="4b8b05022708f2613241f954f0efdf5b4d6fa3d35a6e9b6901dfdf0ec9194259a449e85edb1c0eec950148c385b6eb40ef38bb27987031ec1cac83449ee50eaf  master.zip"