# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Leif Warner <abimelech@gmail.com>

pkgname=python-rdflib
pkgver=6.2.0
pkgrel=3
pkgdesc="A Python library for working with RDF, a simple yet powerful language for representing information"
arch=('any')
url="https://github.com/RDFLib/rdflib"
license=('BSD-3-Clause')
depends=('python-isodate' 'python-pyparsing' 'python-setuptools')
makedepends=('python-build' 'python-installer' 'python-wheel')
optdepends=('python-html5lib: for html support')
checkdepends=('python-pytest-cov' 'python-six' 'python-html5lib' 'python-networkx'
              'python-doctest-ignore-unicode' 'python-pip')
source=(https://github.com/RDFLib/rdflib/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('8177c50e9c2d48859a061dfee24c3560b8f979bc306b3d940a9251ec130e3a324bbad474f4fa7ced5e11522d3bd4e13931461bf106f31177fd972806968d8245')

build() {
  cd rdflib-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd rdflib-$pkgver
  pytest
}

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