# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-deprecated
pkgver=1.2.15
pkgrel=0
pkgdesc="@deprecated decorator to deprecate old python classes, functions or methods."
url="https://github.com/tantale/deprecated"
arch="noarch"
license="MIT"
depends="py3-wrapt<2"
makedepends="py3-setuptools py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-pytest py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/tantale/deprecated/archive/v$pkgver.tar.gz"
builddir="$srcdir/deprecated-$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
}

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

sha512sums="
d15bce4370ef20ad455202c9f1be453aab04e61f6967368a7ae32bed98ae0f3fdb1abee944c7afa203fe11e100e85c7cfa6d7d0cf800b1d70e51e0efca092075  py3-deprecated-1.2.15.tar.gz
"
