# Contributor: Keith Maxwell <keith.maxwell@gmail.com>
# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
pkgname=py3-entrypoints
pkgver=0.4
pkgrel=3
pkgdesc="Discover and load entry points from installed packages."
url="https://github.com/takluyver/entrypoints"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-installer py3-wheel py3-flit-core"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/e/entrypoints/entrypoints-$pkgver.tar.gz"
builddir="$srcdir/entrypoints-$pkgver"

replaces="py-entrypoints" # Backwards compatibility
provides="py-entrypoints=$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/entrypoints-$pkgver-*.whl
}

sha512sums="
874858c240199b9a209e00bde609b33335d199d21a959e51bb875240e2a35ada036380097218e9cd50d5d1dbf9de52638a069cb605ea8e8952db4a5afa3ffd42  entrypoints-0.4.tar.gz
"
