# Maintainer:
# Contributor: Rafael Fontenelle <rafaelff@gnome.org>

_pyname=pytest-datafiles
pkgname=python-$_pyname
pkgver=3.0.0
pkgrel=4
pkgdesc="py.test plugin to create a 'tmpdir' containing predefined files/directories."
arch=(any)
url='https://github.com/omarkohl/pytest-datafiles'
license=(MIT)
depends=(python
         python-pytest)
makedepends=(python-build
             python-installer
             python-setuptools
             python-wheel)
source=(https://github.com/omarkohl/pytest-datafiles/releases/download/$pkgver/$_pyname-$pkgver.tar.gz)
sha256sums=('a70c4c66a36d1cdcfc095607f04eee66eaef3fa64cbb62d60c47ce169901d1d4')

build() {
  cd $_pyname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_pyname-$pkgver
  python -m installer --destdir="$pkgdir/" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
