# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-deprecated
pkgver=1.2.18
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="
b38f14bf73915500d6076642ce7bb9b3ac8975e9c132815a1c559927505b8b2bb4971b683f2cd0a822c3cceca0145499162d8acb385a1e4e1838769bf06143ce  py3-deprecated-1.2.18.tar.gz
"
