# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-jsonschema-path
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=jsonschema-path
pkgver=0.3.4
pkgrel=0
pkgdesc="Object-oriented JSONSchema"
url="https://github.com/p1c2u/jsonschema-path"
arch="noarch"
license="Apache-2.0"
depends="
	py3-jsonschema
	py3-pathable
	py3-yaml
	py3-requests
	py3-referencing
"
checkdepends="
	py3-pytest
	py3-pytest-cov
	py3-responses
"
makedepends="
	poetry
	py3-setuptools
	py3-gpep517
	py3-wheel
"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/p1c2u/jsonschema-path/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$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 "$builddir"/.dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

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

sha512sums="
85b791a374d61bedf66a0ca44b6906ec74f02ffe991c1cb220267c85c0e7b493375d712d7ca0828681c9c15f170bc29d4b808b00778895fb13f1f7ff3cdf2a9c  py3-jsonschema-path-0.3.4.tar.gz
"
