testing/py3-mistletoe: build with gpep517

This commit is contained in:
ptrcnull 2024-08-05 22:34:44 +02:00
parent 251e3a7b50
commit b68a797d63

View File

@ -3,28 +3,33 @@
pkgname=py3-mistletoe
_pkgname="${pkgname#py3-}"
pkgver=1.2.1
pkgrel=1
pkgrel=2
pkgdesc="markdown parser in pure Python, designed to be fast, spec-compliant and fully customizable"
url="https://github.com/miyuchina/mistletoe"
arch="noarch"
license="MIT"
depends="py3-pygments"
makedepends="py3-setuptools"
makedepends="py3-setuptools py3-gpep517"
checkdepends="py3-pytest py3-requests py3-yaml py3-parameterized"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/miyuchina/mistletoe/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
python3 setup.py build
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
pytest
python3 -m venv --clear --without-pip --system-site-packages .testenv
gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 setup.py install --skip-build --root="$pkgdir"
gpep517 install-wheel --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="