# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=epy
pkgver=2023.6.11
pkgrel=1
pkgdesc="CLI Ebook Reader"
url="https://github.com/wustho/epy"
license="GPL-3.0-only"
arch="all"
makedepends="
	py3-gpep517
	py3-poetry-core
	"
checkdepends="py3-pytest py3-coverage"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/wustho/epy/archive/refs/tags/v$pkgver.tar.gz"

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

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
369df8a00ba50237cc0e7cd61e9cc2b4b50dde740435dd812b3b7b0ba9ca9dfc0f191ffaa8ea7e52d674e758807853213f764712ac1a75e6a0b731b4e8c5915f  epy-2023.6.11.tar.gz
"
