# Contributor: Stuart Cardall # Maintainer: Stuart Cardall pkgname=py3-lz4 pkgver=4.3.2 pkgrel=3 pkgdesc="LZ4 Bindings for Python" url="https://pypi.org/project/lz4" arch="all" license="BSD-3-Clause" makedepends=" linux-headers lz4-dev py3-gpep517 py3-pkgconfig py3-setuptools py3-setuptools_scm py3-wheel python3-dev " checkdepends=" py3-coverage py3-psutil py3-pytest py3-pytest-cov py3-pytest-runner " subpackages="$pkgname-pyc" source="https://files.pythonhosted.org/packages/source/l/lz4/lz4-$pkgver.tar.gz" builddir="$srcdir/lz4-$pkgver" # FIXME: check fails on s390x if [ "$CARCH" = "s390x" ]; then options="!check" fi replaces="py-lz4" # Backwards compatibility provides="py-lz4=$pkgver-r$pkgrel" # Backwards compatibility prepare() { default_prepare rm lz4libs/lz4*.[ch] } build() { export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver 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 export PYTHONPATH="$(echo testenv/lib/python3*/site-packages/):$PWD" .testenv/bin/python3 -P -m pytest tests/block tests/frame } package() { python3 -m installer -d "$pkgdir" \ .dist/*.whl } sha512sums=" c2e7d3ec0954110c9b21e562147e80c8abddd21ebb213491d1072454834151a0f3a0935c0f3eebec34c024fe6e79136ccf6363dcb5390aa03cb52489fcb4113c lz4-4.3.2.tar.gz "