# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-nox
pkgver=2024.10.09
pkgrel=0
pkgdesc="Flexible test automation for Python"
url="https://nox.thea.codes/"
arch="noarch"
license="Apache-2.0"
depends="
	py3-argcomplete
	py3-colorlog
	py3-packaging
	py3-py
	py3-setuptools
	py3-virtualenv
	py3-wheel
	python3
	"
makedepends="py3-gpep517 py3-hatchling"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/theacodes/nox/archive/$pkgver/py3-nox-$pkgver.tar.gz"
builddir="$srcdir/nox-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages test-env
	test-env/bin/python3 -m installer \
		.dist/nox*.whl
	# all tox_to_nox tests have python2.7 hardcoded
	test-env/bin/python3 -m pytest --ignore=tests/test_tox_to_nox.py
}

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

sha512sums="
51d1f70ba94d01abd10ba3a12896facd13a7a2881496221b6fa9d0a43ff947303b0cc975a29169a3d9e0174277e23e0bc4b1137b2774c1abffa23a48c9d69a11  py3-nox-2024.10.09.tar.gz
"
