# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=litecli
pkgver=1.12.3
pkgrel=0
pkgdesc="CLI for SQLite Databases with auto-completion and syntax highlighting"
url="https://litecli.com/"
arch="noarch"
license="BSD-3-Clause"
depends="
	python3
	py3-cli_helpers
	py3-click
	py3-configobj
	py3-prompt_toolkit
	py3-pygments
	py3-sqlparse
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-mock py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dbcli/litecli/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="
2b9dda031984d142a9341b19446d2cca366be98058ff57874e66fc60ee936b27f0b2900d7b00dffed058fd985028236148594372dac6a0010894d0502d7db04a  litecli-1.12.3.tar.gz
"
