# Maintainer: envolution
# Contributor: Grafcube <grafcube at disroot dot org>
# shellcheck shell=bash disable=SC2034,SC2154

_pkgname=docopt-ng
pkgname=python-${_pkgname}
pkgver=0.9.0
pkgrel=1
pkgdesc="Jazzband fork of docopt, the humane command line arguments parser"
url="https://github.com/jazzband/docopt-ng"
depends=(python)
makedepends=(git python-build python-pdm-backend python-installer python-wheel)
license=('MIT')
arch=('any')
source=("$_pkgname::git+$url.git#tag=$pkgver")
sha256sums=('ac7004380758ba25be8b2868819c8c2efbc75fd291342e37a6d07f59ee6d2392')

build() {
  cd "${_pkgname}"
  export PDM_BUILD_SCM_VERSION=$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd "${_pkgname}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE-MIT -t ${pkgdir}/usr/share/licenses/${pkgname}
}
# vim:set ts=2 sw=2 et:
