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

pkgname=python-toposort
pkgver=1.10
pkgrel=4
pkgdesc='Implements a topological sort algorithm'
arch=('any')
license=('Apache')
url='https://gitlab.com/ericvsmith/toposort'
depends=('python')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("https://gitlab.com/ericvsmith/toposort/-/archive/$pkgver/toposort-$pkgver.tar.bz2")
sha512sums=('a1bf41e7324b56eaf914e6b89f0ec5e18c6661d8d31b429e169086c71d1060b6aa0e29cc048fe971455b5b43e500a1d74fea0168c4c869cdab09206ba3f9c50f')

build() {
  cd toposort-$pkgver
  python -m build -nw
}

check() {
  cd toposort-$pkgver
  make test
}

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