maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=dooit
pkgver=3.0.4
pkgrel=0
pkgdesc="TUI todo manager"
url="https://dooit-org.github.io/dooit/"
arch="noarch"
license="MIT"
depends="
	python3
	py3-click
	py3-dateutil
	py3-platformdirs
	py3-pyperclip
	py3-sqlalchemy
	py3-textual
	py3-tzlocal
	py3-yaml
	"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="
	py3-faker
	py3-pytest
	py3-pytest-asyncio
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dooit-org/dooit/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="
cfe5bedf006e414107098b32cf155abf36a09feff5458fab0b87407ee43d02cf7b0a5a182debabe65c17679b109c79da8d6985a9f0ef08ae71a363f4c00f6af0  dooit-3.0.4.tar.gz
"
