# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-libsass
pkgver=0.23.0
pkgrel=1
pkgdesc="Straightforward binding of libsass for Python"
url="https://sass.github.io/libsass-python/"
arch="all"
license="MIT"
depends="py3-setuptools"
makedepends="
	libsass-dev
	py3-gpep517
	py3-wheel
	python3-dev
	"
checkdepends="
	py3-pytest
	py3-werkzeug
	"
subpackages="$pkgname-pyc"
source="https://github.com/sass/libsass-python/archive/$pkgver/py3-libsass-$pkgver.tar.gz"
builddir="$srcdir/libsass-python-$pkgver"

build() {
	export SYSTEM_SASS="true"

	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 sasstests.py
}

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

sha512sums="
fb0836cce26ef8cdfb90cb50842e66f83ed47d06327272a49db3f2cf4b7f1bc29560d0126f00ff13db626d0624ff154c342a0f2433802d4c1b582b8d74a50337  py3-libsass-0.23.0.tar.gz
"
