# Contributor: Emma Nora Theuer <kontakt@entheuer.de>
# Contributor: Dominika Liberda <ja@sdomi.pl>
# Maintainer: Emma Nora Theuer <kontakt@entheuer.de>
pkgname=qtile
pkgver=0.30.0
pkgrel=0
pkgdesc="A full-featured, hackable tiling X11 window manager written and configured in Python"
url="https://github.com/qtile/qtile"
arch="all"
license="MIT"
depends="
	pango
	py3-cairocffi
	py3-dbus-next
	py3-xcffib
	"
makedepends="
	libx11-dev
	pango
	py3-cffi
	py3-setuptools
	py3-setuptools_scm
	py3-gpep517
	"
options="!check" # broken due to unavailable packages
subpackages="$pkgname-pyc"
source="qtile-$pkgver.tar.gz::https://github.com/qtile/qtile/archive/v$pkgver.tar.gz"

build() {
	export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
91447fd31f0fbac1c5e95172bccca0e594c090c701d4393d06e69b319f1a75eb73a5799723d92448971ba8b6367e592d4c32faf3f3631caaa20d49b9cc8b2751  qtile-0.30.0.tar.gz
"
