# Contributor: Anjandev Momi <anjan@momi.ca>
maintainer="Hugo Osvaldo Barrera <hugo@whynothugo.nl>"
pkgname=trash-cli
pkgver=0.24.5.26
pkgrel=0
pkgdesc="Command line interface to the freedesktop.org trashcan"
url="https://github.com/andreafrancia/trash-cli"
arch="noarch"
license="GPL-2.0-or-later"
depends="python3 py3-psutil py3-six"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-mock py3-flexmock py3-parameterized"
subpackages="$pkgname-doc $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/andreafrancia/trash-cli/archive/refs/tags/$pkgver.tar.gz"

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 -v
}

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

sha512sums="
3bf5e60cd786a17e10708e79191bcfb7a16493f3a3c7d2f16326ec86a7733541174dbde234da9891b95c56350fa7bbd6a1db143ea6e54d8a6267198973f5e0f7  trash-cli-0.24.5.26.tar.gz
"
