# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>

pkgname=python-smartypants
_pyname=smartypants
pkgver=2.0.1
pkgrel=2
pkgdesc="Python with the SmartyPants"
url="https://github.com/leohemsted/smartypants.py"
license=('spdx:BSD-2-Clause')
arch=('any')
depends=('python')
makedepends=(
  'python-setuptools'
  'python-build'
  'python-installer'
  'python-wheel'
)
sha256sums=('b98191911ff3b4144ef8ad53e776a2d0ad24bd508a905c6ce523597c40022773')
source=("$pkgname-$pkgver.tar.gz::https://github.com/leohemsted/${_pyname}.py/archive/v${pkgver}.tar.gz")

build() {
  cd "$_pyname.py-$pkgver"

  python -m build --wheel --no-isolation
}

package() {
  cd "$_pyname.py-$pkgver"

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
