# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-expandvars
pkgver=1.0.0
pkgrel=0
pkgdesc="Expand system variables Unix style"
url="https://pypi.org/project/expandvars/"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-hatchling"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/e/expandvars/expandvars-$pkgver.tar.gz"
builddir="$srcdir/expandvars-$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="
06aacf831973386fe4a366477eefa93f9118ed0cb66822b7bca719eb688850e9803cf34a109ee51daa6147352a3b86da87667ba5d6018615778feabbcfaf3c6b  expandvars-1.0.0.tar.gz
"
