# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Brendan MacDonell <macdonellba at gmail dot com>

pkgname=python-llfuse
pkgver=1.5.1
pkgrel=1
pkgdesc="A set of Python bindings for the low level FUSE API."
arch=('x86_64')
url="https://github.com/python-llfuse/python-llfuse/"
license=('LGPL')
depends=('python' 'fuse2')
makedepends=('python-setuptools' 'cython')
checkdepends=('python-pytest')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/l/llfuse/llfuse-$pkgver.tar.gz")
sha256sums=('7c9be52289cf647e3d735104531cc23a1a89fd1be3a621613a1cc0991f1b2699')

prepare() {
  cd "${srcdir}/llfuse-${pkgver}"
}

build() {
  cd "${srcdir}/llfuse-${pkgver}"
  python setup.py build_cython
  python setup.py build_ext --inplace
}

check() {
  cd "${srcdir}/llfuse-${pkgver}"
  # https://github.com/python-llfuse/python-llfuse/issues/35 tests incompatible with pytest>=6
  #python -m pytest test/
}

package() {
  cd "${srcdir}/llfuse-${pkgver}"
  python setup.py install --root="$pkgdir" --optimize=1
}
