# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

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

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:
