# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-pyfakefs
pkgver=6.2.0
pkgrel=1
pkgdesc='pyfakefs implements a fake file system that mocks the Python file system modules'
url=https://github.com/jmcgeheeiv/pyfakefs/
license=(APACHE)
arch=(any)
depends=(python-pytest)
makedepends=(
  git
  python-build
  python-installer
  python-setuptools
  python-wheel
)
checkdepends=(
  python-pandas
  python-xlrd
  python-openpyxl
)
source=(git+https://github.com/jmcgeheeiv/pyfakefs.git#tag=v${pkgver})
b2sums=('28ecdb4b11a5336a5612ef59cab0d758033e4460da2a8405ebff45cb58cbbac4e04176b633ae7447eb89ea73bc1eefb887aa1a394995891e16cd69ad6cf36e7b')

build() {
  cd  pyfakefs
  python -m build --wheel --no-isolation
}

check() {
  cd  pyfakefs
  python -m pyfakefs.tests.all_tests
  python -m pytest pyfakefs/pytest_tests/pytest_plugin_test.py
}

package() {
  python -m installer --destdir="${pkgdir}" pyfakefs/dist/*.whl
}

# vim: ts=2 sw=2 et:
