# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-aniso8601
pkgver=10.0.1
pkgrel=1
pkgdesc="A library for parsing ISO 8601 strings."
url="https://codeberg.org/nielsenb-jf/aniso8601"
license=('BSD-3-Clause')
arch=('any')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-dateutil' 'python-pytest')
source=("git+https://codeberg.org/nielsenb-jf/aniso8601.git#tag=v$pkgver")
sha512sums=('60e496afb3455215cecf99bb79e1cc549ce5660ca9e14d82714730a637688f77c2a617f2e8e9eebc98e9c0efc0907625ca273432611d66807ff4a258bf15e27f')

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

check() {
  cd aniso8601
  pytest .
}

package() {
  cd aniso8601
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
