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

pkgname=python-pyfakefs
pkgver=5.10.2
pkgrel=2
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=8b9823cd78f3773c5f5c7f8bb6513f7acdf4c1ca
source=(git+https://github.com/jmcgeheeiv/pyfakefs.git#tag=${_tag})
b2sums=('9c9a78b1d76744197aa0291f7037b11a6acf9385833eaae80ce55cf14e74d2b0d0836e748d0224dc35be102dea510424527c80d158d9db221f3b81a61cab6de4')

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:
