summaryrefslogtreecommitdiff
path: root/repo/python-matrix-nio/python-matrix-nio.xibuild
blob: 81db0270cae8196f1d18fdb7632ec96a3ea67991 (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
#!/bin/sh

NAME="python-matrix-nio"
DESC="Python interface to DBus notifications"

MAKEDEPS="python-build python-installer python-poetry-core python-pyrsistent"

PKG_VER=0.19.0
SOURCE="
	https://github.com/poljar/matrix-nio/archive/$PKG_VER/matrix-nio-$PKG_VER.tar.gz
    "

build() {
	# XXX: hack to make poetry not ignore files
	GIT_DIR=. python3 -m build --no-isolation --wheel
}

check() {
	python3 -m installer -d testenv \
		dist/matrix_nio-$PKG_VER-py3-none-any.whl
	local sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
	# test_connect_wrapper requires a network connection
	PYTHONPATH="$PWD/testenv/$sitedir" python3 -m pytest -k 'not test_connect_wrapper'

}

package() {
	python3 -m installer -d "$PKG_DEST" \
		dist/matrix_nio-$PKG_VER-py3-none-any.whl
}