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

pkgname=python-outcome
pkgver=1.3.0.post0
pkgrel=5
pkgdesc='Capture the outcome of Python function calls'
arch=(any)
url=https://github.com/python-trio/outcome
license=(MIT)
depends=(
  python
  python-attrs
  python-typing_extensions
)
makedepends=(
  git
  python-build
  python-installer
  python-setuptools
  python-wheel
)
checkdepends=(
  python-pytest
  python-pytest-asyncio
)
_tag=bf687c97ce6f010d092bfcaecad51132fb978725
source=(git+https://github.com/python-trio/outcome.git#tag=${_tag})
sha256sums=(SKIP)

pkgver() {
  cd outcome
  git describe --tags | sed 's/^v//'
}

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

check() {
  cd outcome
  PYTHONPATH=$PWD/build/lib pytest
}

package() {
  python -m installer --destdir="${pkgdir}" outcome/dist/*.whl
  install -Dm 644 outcome/LICENSE -t "${pkgdir}"/usr/share/licenses/python-outcome/
}

# vim: ts=2 sw=2 et:
