# Contributor: Guy Godfroy <guy.godfroy@gugod.fr>
# Maintainer: Guy Godfroy <guy.godfroy@gugod.fr>
pkgname=apprise
pkgver=1.9.0
pkgrel=0
pkgdesc="Push Notifications that work with just about every platform"
url="https://github.com/caronc/apprise"
arch="noarch"
license="BSD-2-Clause"
depends="py3-certifi py3-requests py3-requests-oauthlib py3-click py3-markdown py3-yaml"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-mock"
subpackages="$pkgname-doc $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/caronc/apprise/tar.gz/refs/tags/v$pkgver"
options="net"

case "$CARCH" in
s390x|x86)
	options="$options !check" # some tests fail on package builders
	;;
esac

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	sh bin/test.sh
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
	install -Dm644 packaging/man/apprise.1 -t "$pkgdir"/usr/share/man/man1
}

sha512sums="
824bf4c9806a3d0098cc464e5ed99044cfd2250755e42f25e7a7e96263acd0571da5c7213ed0dc752ae8421fc11a849fd0fd72faf595cd8bfd36b33394f347ec  apprise-1.9.0.tar.gz
"
