# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-mdit-py-plugins
pkgver=0.4.2
pkgrel=0
pkgdesc="Collection of core plugins for markdown-it-py"
url="https://mdit-py-plugins.readthedocs.io/"
arch="noarch"
license="MIT"
depends="python3 py3-markdown-it-py"
makedepends="py3-gpep517 py3-flit-core py3-installer"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/executablebooks/mdit-py-plugins/archive/v$pkgver/py3-mdit-py-plugins-$pkgver.tar.gz"
builddir="$srcdir/mdit-py-plugins-$pkgver"
options="!check" # needs py3-pytest-regressions

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

check() {
	pytest
}

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

sha512sums="
203a0243968eb9240436c992b70ad0a4b13a747af9ec1799408975cf430d908e8c161cc6810385e21e09eb2d50aeae73f0aed11790898e5d6291b0d4c20521cd  py3-mdit-py-plugins-0.4.2.tar.gz
"
