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

pkgname=python-pyfakefs
pkgver=5.9.2
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
)
_tag=f2daf3e4de68a4742437c11610033d62a00717c6
source=(git+https://github.com/jmcgeheeiv/pyfakefs.git#tag=${_tag})
b2sums=('3a0c708503deab7b81b0f0fead7880b2da186e06ecabb86eb3fbd7260254c27fe457318c3efd61e621f6a70815abda24cd22179f2e04e04afb389525e99e72de')

pkgver() {
  cd pyfakefs
  git describe --tags | sed 's/^v//'
}

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

check() {
  cd  pyfakefs
  python -m pyfakefs.tests.all_tests
  python -m pyfakefs.tests.all_tests_without_extra_packages
  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:
