# Contributor: Dhruvin Gandhi <contact@dhru.vin>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-boolean.py
_pkgname=boolean.py
pkgver=4.0
pkgrel=5
pkgdesc="Define boolean algebras, create and parse boolean expressions and DSL"
url="https://github.com/bastikr/boolean.py"
arch="noarch"
license="BSD-2-Clause"
makedepends="py3-setuptools py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/b/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$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="
2b0328d0ae8a4c75ad3093f63491edf8a104471a8fc915dfc735bf2e78edae89513f21f7c59c7235db55a56d1cf019ac4dbf0f5a9e972d930b0e5006458b1f33  boolean.py-4.0.tar.gz
"
