# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=latex-clean-fig
pkgver=0.1.0
pkgrel=0
pkgdesc="Remove unused image files from a LaTeX project directory"
url="https://github.com/firefly-cpp/latex-clean-fig"
arch="noarch"
license="MIT"
depends="python3 py3-typer"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-poetry-core"
subpackages="$pkgname-pyc"
source="https://github.com/firefly-cpp/latex-clean-fig/archive/$pkgver/latex-clean-fig-$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/latex_clean_fig-$pkgver-py3-none-any.whl

}

sha512sums="
781a93e7655edd6ebd270535205e4ab37c13e88ef0aec0a0ea85d7cdd436752a4d8df8dc83543fb62b4debbfb5793f8a1d60c118ea6d611ba92045cfb893c451  latex-clean-fig-0.1.0.tar.gz
"
