# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=py3-jsonlines
pkgver=4.0.0
pkgrel=1
pkgdesc="python library to simplify working with jsonlines and ndjson data"
url="https://github.com/wbolster/jsonlines"
arch="noarch"
license="BSD-3-Clause"
depends="
	py3-attrs
	python3
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest
	py3-pytest-cov
	"
subpackages="$pkgname-pyc"
source="https://github.com/wbolster/jsonlines/archive/refs/tags/$pkgver/jsonlines-$pkgver.tar.gz"
builddir="$srcdir/jsonlines-$pkgver"

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="
d197163b4875dd5d30afdd8e5b9415d8faa3af2787bbecbc7a7f79aa28e775b2e119bffdf61699e132552af19ff97d6412fe83d328e4022acd920456addeb275  jsonlines-4.0.0.tar.gz
"
