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

pkgname=python-pathable
pkgver=0.6.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=('e971ebfc1db084502f77dd3c128fd0f7ce28baac4caad4e53b3b328d1d9552f743e182e39a64e316505ae6a6117ec7ecd7d02d841d0de74b0dc4930e1da11dfb')

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
}
