# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py3-pypandoc
pkgver=1.14
pkgrel=0
pkgdesc="Thin wrapper for pandoc"
url="https://github.com/NicklasTegner/pypandoc"
arch="aarch64 x86_64" # pandoc
license="MIT"
depends="python3 pandoc"
makedepends="py3-gpep517 py3-poetry-core"
options="!check" # missing pandoc-citeproc
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/p/pypandoc/pypandoc-$pkgver.tar.gz"
builddir="$srcdir/pypandoc-$pkgver"

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

check() {
	python3 setup.py test
}

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

sha512sums="
0f8b5c3ab294f8e2d0197cfccb7487a235c7d3002a04dda36abe9ffb39522e3561052732865dffbaa7a53fc9c231aec194efd8c65f133d4cdc54b0d6a0b1dc71  pypandoc-1.14.tar.gz
"
