# Contributor: Andy Hawkins <andy@gently.org.uk>
# Maintainer: Andy Hawkins <andy@gently.org.uk>
pkgname=borg-space
pkgver=2.3
pkgrel=0
pkgdesc="Report and track the size of your Borg repositories"
url="https://pypi.org/project/borg-space/"
license="GPL-3.0-or-later"
# armhf: emborg
arch="noarch !armhf"
depends="
	py3-appdirs
	py3-arrow
	py3-docopt
	py3-inform>=1.34
	py3-matplotlib
	py3-nestedtext
	py3-quantiphy
	py3-shlib
	py3-voluptuous>=0.14
	"
makedepends="
	py3-flit-core
	py3-gpep517
	"
checkdepends="
	py3-parametrize-from-file
	py3-pytest
	py3-pytest-tmp-files
	py3-pytest-xdist
	py3-re-assert
	"
subpackages="$pkgname-pyc"
source="https://github.com/KenKundert/borg-space/archive/v$pkgver/borg-space-$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 -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/borg_space-$pkgver*-py3-none-any.whl
}

sha512sums="
e604381e54a7032df7b0f59ebca9dda82a24414e30418a49dd5f2615c601e01e5166a8b09b08e40001fd95d85b5391fde31eda845c011f46ffae95dc03c11cf0  borg-space-2.3.tar.gz
"
