# Contributor: Justin Berthault <justin.berthault@zaclys.net>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=py3-send2trash
pkgver=1.8.3
pkgrel=0
pkgdesc="Send file to trash natively"
url="https://github.com/arsenetar/send2trash"
arch="noarch"
license="BSD-3-Clause"
makedepends="py3-setuptools py3-gpep517 py3-installer py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/arsenetar/send2trash/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/"send2trash-$pkgver

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

check() {
	pytest tests
}

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

sha512sums="
82ac89b0d6224c1ea1e87f502da1259afddf5720d104135add59d0d57f21ac9c984802989afa89e08d35b9a574b26bdcd1c8671c00a20d3a6eb7cf3913740fa3  py3-send2trash-1.8.3.tar.gz
"
