maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=gallery-dl
pkgver=1.29.6
pkgrel=0
pkgdesc="CLI tool to download image galleries"
url="https://github.com/mikf/gallery-dl"
arch="noarch"
license="GPL-2.0-or-later"
depends="py3-requests python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest yt-dlp"
subpackages="
	$pkgname-doc
	$pkgname-pyc
	$pkgname-bash-completion
	$pkgname-zsh-completion
	$pkgname-fish-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/mikf/gallery-dl/archive/v$pkgver.tar.gz"

build() {
	make man completion

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

check() {
	make test
}

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

sha512sums="
bc0f1c74a9ed3d28e46e52f0c130491853ac095570a07b4078667e19abc0fe16e7b946798655f69ea42174a3eb2e711e89b235c34fc39915a59ea72c672d6474  gallery-dl-1.29.6.tar.gz
"
