# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Felix Yan <felixonmars@archlinux.org>

pkgname=python-freezegun
pkgver=1.5.1
pkgrel=1
pkgdesc='Let your Python tests travel through time'
arch=(any)
url='https://github.com/spulec/freezegun'
license=('Apache-2.0')
depends=('python' 'python-dateutil')
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
checkdepends=('python-pytest')
source=("$pkgname::git+$url#tag=$pkgver")
sha512sums=('d826c24cbc7a5b622e3bc6b647b220ef99630e41c8c3b663d919c0e703e691289cca1c359417a5d5801dcb44c53a40b90b6a4e382409fbb20d3316a31c24a88e')
b2sums=('42436f375fa49461338fff315602a86b3e69bf4fd5aa53432de6b111f90314faf72736a27e6060dbd4ad7bda19f38aa3357737b9afff444301607100d0b057a7')

build() {
  cd "$pkgname"

  python -m build --wheel --no-isolation
}

check() {
  cd "$pkgname"

  TZ=C pytest -vvv
}

package() {
  cd "$pkgname"

  python -m installer --destdir="$pkgdir" dist/*.whl
}
