# Maintainer:

_pyname=expandvars
pkgname=python-$_pyname
pkgver=0.12.0
pkgrel=2
pkgdesc='Expand system variables Unix style'
arch=(any)
url='https://github.com/sayanarijit/expandvars'
license=(BSD)
depends=(python)
makedepends=(python-build
             python-hatchling
             python-installer)
checkdepends=(python-pytest)
source=(https://github.com/sayanarijit/expandvars/archive/v$pkgver/$_pyname-$pkgver.tar.gz)
sha256sums=('dea375871e614bf2d2e5568f96d1101ab42985559cf48c0428d3591b5b59024c')

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

check() {
  cd $_pyname-$pkgver
  pytest -v
}

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