# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>

pkgname=python-arrow
pkgver=1.4.0
pkgrel=2
pkgdesc='Better dates and times for Python'
arch=(any)
url=https://arrow.readthedocs.io
license=(Apache-2.0)
depends=(
  python
  python-dateutil
  python-types-python-dateutil
)
makedepends=(
  git
  python-build
  python-flit-core
  python-installer
)
checkdepends=(
  python-pytest
  python-pytest-mock
  python-pytz
  python-simplejson
)
_tag=2c1f5185ad66bf3b1cf8c0812f4b4fe65ac46656
source=(git+https://github.com/arrow-py/arrow.git#tag=${_tag})
b2sums=('53a5d9a7f966fe7d3cd1b188e4f46d30faffa1951967f1e60c423ae149ef9dfbe49d9425bf1b090f90dfa03e7d9aeb506c148e9d4c17ec1fa5f5bb1904be34aa')

pkgver() {
  cd arrow
  git describe --tags
}

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

check() {
  cd arrow
  pytest -vv -o addopts=''
}

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

# vim: ts=2 sw=2 et:
