# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=py3-configobj
pkgver=5.0.9
pkgrel=0
pkgdesc="Python3 library for reading and writing of configuration files (ini)"
url="https://github.com/DiffSK/configobj"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-six"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/c/configobj/configobj-$pkgver.tar.gz"
builddir="$srcdir"/configobj-$pkgver
options="!check" # no tests on pypi

replaces="py-configobj" # Backwards compatibility
provides="py-configobj=$pkgver-r$pkgrel" # Backwards compatibility

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

check() {
	pytest
}

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

sha512sums="
239a7ff8986ecdbe7be5e62a8ed0c9d8840811abbaefc82e9eaa9b25d744631262f183f98247e6fd7a3c2b1d5f3b27c07926ff87dd577411a52ecc9ba3f8f2e7  configobj-5.0.9.tar.gz
"
