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

pkgname=python-transaction
pkgver=5.1
pkgrel=2
pkgdesc='Transaction management for Python'
arch=('any')
license=('ZPL-2.1')
url='https://github.com/zopefoundation/transaction'
depends=('python-zope-interface')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'python-setuptools')
checkdepends=('python-zope-testrunner')
source=("git+https://github.com/zopefoundation/transaction.git#tag=$pkgver")
sha512sums=('d836c40f8696628d94ec23a380767a2b47394b87a49cc39ad7ed9c3e052ef6e3b7f2c196c5da6567570e254dbf5db3b9b630ee69e7b5781ae753cceb66423887')

prepare() {
  cd transaction
  sed -i 's/,< 81//' pyproject.toml
}

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

check() {
  cd transaction
  PYTHONPATH="$PWD/src" zope-testrunner --test-path=src
}

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

# vim:set ts=2 sw=2 et:
