# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=py3-zstandard
pkgver=0.21.0
pkgrel=4
pkgdesc="Python bindings to the Zstandard (zstd) compression library"
url="https://github.com/indygreg/python-zstandard"
license="BSD-3-Clause"
arch="all"
depends="python3"
# use bundled zstd, due to the system zstd may not match the actually used
# headers.
# https://github.com/indygreg/python-zstandard/issues/48#issuecomment-2032474718
makedepends="python3-dev py3-setuptools py3-cffi"
checkdepends="py3-hypothesis"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/indygreg/python-zstandard/archive/$pkgver.tar.gz"
builddir="$srcdir/python-zstandard-$pkgver"

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --root="$pkgdir" --skip-build
}

sha512sums="
51a7a7a6c20733858f96763738f3097f52dae1ca3a33bad3e78e31d6f339d8f2ddb0a7da2fafaa0b162b17e5054c0582ab52054f1215e8c39d8e1f8002babd7c  py3-zstandard-0.21.0.tar.gz
"
