# Contributor: Jiri Kastner <cz172638@gmail.com>
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=py3-jaraco.collections
pkgver=5.1.0
pkgrel=0
pkgdesc="jaraco - Module for text manipulation"
url="https://github.com/jaraco/jaraco.collections"
arch="noarch"
license="MIT"
depends="py3-jaraco.classes py3-jaraco.text"
# py3-setuptools_scm is needed to set python module version
makedepends="py3-gpep517 py3-setuptools py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/j/jaraco.collections/jaraco_collections-$pkgver.tar.gz"
builddir="$srcdir/jaraco_collections-$pkgver"

# Tests fail to pass as of August 26, 2024.
options="!check"

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

check() {
	python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/jaraco.collections-$pkgver-py3-none-any.whl
}

sha512sums="
b03b247657ad25df0b86ad125728e37c8123fdd1834adfc16c7e41fb9c31b9d4c1b168ed40614b965caafc7dd55fd14bba8c355648c8b5cca13b50736bc32883  jaraco_collections-5.1.0.tar.gz
"
