# Template file for 'bumblebee-status'
pkgname=bumblebee-status
version=2.1.6
revision=2
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-netifaces python3-psutil python3-requests"
checkdepends="python3-pytest-xdist python3-pytest-mock python3-freezegun
 psmisc $depends"
short_desc="Modular, theme-able status line generator for the i3 window manager"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/tobi-wan-kenobi/bumblebee-status"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=db71030058ea2041d9e441b5615975893635801194974cc03e1c6271f5b356d9

do_check() {
	# fail on musl due to lack of locales
	if [ "$XBPS_TARGET_LIBC" = musl ]; then
		python3 -m pytest -k "not test_date and not test_time"
	else
		python3 -m pytest
	fi
}

post_patch() {
	vsed -i '/usr.share.bumblebee-status/s/bin/utility/' bumblebee_status/discover.py
}

post_install() {
	rm $DESTDIR/usr/share/bumblebee-status/utility/pacman-updates
	vlicense LICENSE
}
