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

pkgname=python-pathable
pkgver=0.5.0
pkgrel=1
pkgdesc="Object-oriented paths"
url="https://github.com/p1c2u/pathable"
license=('Apache-2.0')
arch=('any')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-poetry-core')
checkdepends=('python-pytest')
source=("git+https://github.com/p1c2u/pathable.git#tag=$pkgver")
sha512sums=('5c2d69556e3b8a7054be77014109d01b40289d098e0674ae51f7555cf18b017c6fe93849b7c7e8bb72288e15b0af4776c83d4f21fcc353f8557ae60ee7da0dbf')

prepare() {
  cd pathable
  sed -i '/--cov/d' pyproject.toml
}

build() {
  cd pathable
  python -m build -wn
}

check() {
  cd pathable
  pytest
}

package() {
  cd pathable
  python -m installer -d "$pkgdir" dist/*.whl
}
