# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-flask-accept
_pkgname=flask_accept
pkgver=0.0.6
pkgrel=1
pkgdesc="Custom Accept header routing support for Flask"
url="https://github.com/di/flask-accept"
arch="noarch"
license="MIT"
depends="
	py3-flask
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-flake8
	"
options="!check"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/f/flask_accept/flask_accept-$pkgver.tar.gz"

builddir="$srcdir"/$_pkgname-$pkgver

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

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -W ignore::DeprecationWarning
}

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

sha512sums="
1f3eff090ee847e27323b62c0c9fffc34c74fc120c4828550caa93403d0462227554a470b565e6d9be045d923682995df1faa342a3df6cc1defdaafaf52b9af0  flask_accept-0.0.6.tar.gz
"
