aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-xlib
diff options
context:
space:
mode:
authorIvan Tham <pickfire@riseup.net>2017-04-28 01:19:55 +0800
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-06-02 08:32:44 +0000
commit146b2a4eb2aa87c07bd9034c7b8ed49e4184855c (patch)
tree3c22b421b8c94ecb2d7513687721a09ad3dc4045 /testing/py-xlib
parent2bddc15de66effeca01a7856e54a862c52a21391 (diff)
downloadaports-146b2a4eb2aa87c07bd9034c7b8ed49e4184855c.tar.bz2
aports-146b2a4eb2aa87c07bd9034c7b8ed49e4184855c.tar.xz
testing/py-xlib: new aport
https://github.com/python-xlib/python-xlib A fully functional X client library for Python programs
Diffstat (limited to 'testing/py-xlib')
-rw-r--r--testing/py-xlib/APKBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/testing/py-xlib/APKBUILD b/testing/py-xlib/APKBUILD
new file mode 100644
index 0000000000..1a2d34bc3c
--- /dev/null
+++ b/testing/py-xlib/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Ivan Tham <pickfire@riseup.net>
+# Maintainer: Ivan Tham <pickfire@riseup.net>
+pkgname=py-xlib
+_pkgname=python-xlib
+pkgver=0.19
+pkgrel=0
+pkgdesc="A fully functional X client library for Python programs"
+url="https://github.com/python-xlib/python-xlib"
+arch="noarch"
+license="LGPL2"
+depends="py-six"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="${pkgname/py-/py3-}:_py3 ${pkgname/py-/py2-}:_py2"
+source="https://github.com/$_pkgname/$_pkgname/releases/download/$pkgver/$_pkgname-$pkgver.tar.bz2"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py test
+ python3 setup.py test
+}
+
+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="070807eed50ce9a17926c36686dac5c143deff0b687a2967afade1a2f776d42ffbea0bbfad3a7480118ba7b1cf5ac0bb64978fdd3ca125c1df651af456dba5be python-xlib-0.19.tar.bz2"