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

pkgname=python-jaraco.path
pkgver=3.7.2
pkgrel=1
pkgdesc="Miscellaneous path functions"
url="https://github.com/jaraco/jaraco.path"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm' 'python-wheel')
checkdepends=('python-pytest-enabler' 'python-pytest-mypy')
source=("git+https://github.com/jaraco/jaraco.path.git#tag=v$pkgver")
sha512sums=('700d744d012754d82b465d7f9cd05e86b6690f651dbf4e1e8e6f00aab5847b9b776a07c2f7dc7407a3f59673a5c18c2c43f82f40760e6ed56862ce66e1831050')

build() {
  cd jaraco.path
  python -m build -wn
}

check() {
  cd jaraco.path
  python -m pytest
}

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