# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=py3-pyfuse3
pkgver=3.3.0
pkgrel=0
pkgdesc="Python 3 bindings for libfuse 3 with asynchronous API"
url="https://github.com/libfuse/pyfuse3"
# armhf,armv7,x86: fails to build
arch="all !armhf !armv7 !x86"
license="LGPL-2.0-or-later"
depends="
	py3-trio
	python3
	"
makedepends="
	cython
	fuse3-dev
	linux-headers
	py3-setuptools
	python3-dev
	"
checkdepends="
	cmd:fusermount3
	py3-pytest
	py3-pytest-trio
	"
subpackages="$pkgname-pyc"
source="https://github.com/libfuse/pyfuse3/archive/$pkgver/pyfuse3-$pkgver.tar.gz
	test-fusermount3.patch
	"
builddir="$srcdir/pyfuse3-$pkgver"

build() {
	python3 setup.py build_cython
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo build/lib.linux-*)" pytest -v
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
a410cd839c3d36b49e6366bfb072b60245211d902cd52e3600992cd24c94e0fe86276061866c70219f379b9ce32cc3e3b7ef4f9b17d3ba04c631fad946190201  pyfuse3-3.3.0.tar.gz
b120842926771af4a4c8c949461abed34608d5917814bb97180767e33b718acaaacb07e22afe663622fb85126cb831b9c7ac0f7993687c04ca717e2584babf72  test-fusermount3.patch
"
