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

pkgname=python-pathable
pkgver=0.4.3
pkgrel=4
pkgdesc="Object-oriented paths"
url="https://github.com/p1c2u/pathable"
license=('Apache')
arch=('any')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-poetry-core')
checkdepends=('python-pytest')
source=("https://github.com/p1c2u/pathable/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('5481ba1e6f4ab4318b9a7bd1d1ddd152f715b001bc7edd1b1221501da1a95578ee6601ce4ce0bdb98773c7954212687d249418e69acef1b350fc5d6cb188dbfc')

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

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

check() {
  cd pathable-$pkgver
  pytest
}

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