# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-littleutils
pkgver=0.2.4
pkgrel=0
pkgdesc="Small personal collection of Python utility functions"
url="https://pypi.org/project/littleutils/"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/alexmojaki/littleutils/archive/v$pkgver/py3-littleutils-$pkgver.tar.gz"
builddir="$srcdir/littleutils-$pkgver"

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

# no test suite; use smoke test
check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -c 'from littleutils import *'
}

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

sha512sums="
c0d140e9324a85cf883133d3301b1d371631402736e42d36051842a31ae94c01287fa6ea9fbf1319aef4d3836bd23c0e853b1363b7f25661518f3ff0e9f20251  py3-littleutils-0.2.4.tar.gz
"
