aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Fontaine <antoine.fontaine@epfl.ch>2020-05-31 20:04:58 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-08-29 18:45:41 -0300
commit8452146f62ba30bda43c3f77a496b4ba3c591ad9 (patch)
tree17a912b09327df17f7be7e5da82f6fab80cfdb3a
parent44c2b69713faa6672da6f6f5f4c95b89c70cd1ff (diff)
downloadaports-8452146f62ba30bda43c3f77a496b4ba3c591ad9.tar.gz
aports-8452146f62ba30bda43c3f77a496b4ba3c591ad9.tar.bz2
aports-8452146f62ba30bda43c3f77a496b4ba3c591ad9.tar.xz
testing/py3-notify2: new aport
-rw-r--r--testing/py3-notify2/APKBUILD31
-rw-r--r--testing/py3-notify2/test-wrapper.sh16
2 files changed, 47 insertions, 0 deletions
diff --git a/testing/py3-notify2/APKBUILD b/testing/py3-notify2/APKBUILD
new file mode 100644
index 0000000000..c64edad4e7
--- /dev/null
+++ b/testing/py3-notify2/APKBUILD
@@ -0,0 +1,31 @@
+# Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch>
+# Maintainer: Antoine Fontaine <antoine.fontaine@epfl.ch>
+pkgname=py3-notify2
+pkgver=0.3.1
+pkgrel=0
+pkgdesc="Python interface to DBus notifications"
+url="https://pypi.org/project/notify2/"
+arch="noarch"
+license="BSD-2-Clause"
+depends="python3 py3-dbus py3-gobject3"
+checkdepends="xvfb-run dunst dbus"
+makedepends="py3-setuptools"
+source="https://files.pythonhosted.org/packages/source/n/notify2/notify2-$pkgver.tar.gz
+ test-wrapper.sh"
+builddir="$srcdir/notify2-$pkgver"
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ dbus-run-session xvfb-run \
+ sh "$srcdir"/test-wrapper.sh
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="0b69a64e0a7e4955ee767c975db92c5c60d28c0e54f77498cfb98390771a8f536631fc34e42b5c46c138dfa1054b5516a0809b8e3b0cb9237a39825ddb827109 notify2-0.3.1.tar.gz
+fd28280cbe7ec98c53cd898b7ebe843f1df2a953ce7e7e0d6abf50f66ca52481095338858439dec61a660a84cffe8fda4122afbc7a73da24e66408891c63c79a test-wrapper.sh"
diff --git a/testing/py3-notify2/test-wrapper.sh b/testing/py3-notify2/test-wrapper.sh
new file mode 100644
index 0000000000..b4763bc0e8
--- /dev/null
+++ b/testing/py3-notify2/test-wrapper.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Copyright 2020 Antoine Fontaine
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# tiny wrapper that starts a notification dæmon (dunst)
+# for the testsuite to talk to
+
+dunst >/dev/null 2>&1 &
+dunst_pid=$!
+
+python3 test_notify2.py
+success=$?
+
+kill $dunst_pid
+
+exit $success