# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer : Felix Yan <felixonmars@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Alex Anthony <alex.anthony28991@gmail.com>

pkgname=python-markupsafe
pkgver=2.1.5
pkgrel=2
pkgdesc="Implements a XML/HTML/XHTML Markup safe string for Python"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://pypi.python.org/pypi/MarkupSafe"
license=('BSD-3-Clause')
depends=('glibc' 'python')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
source=("git+https://github.com/pallets/markupsafe.git#tag=$pkgver")
sha512sums=('449daf8db6f1356f865cdb814be7a11c02a3c6dc130207193c6e300f0055d877378aaee0eb3634b3ce052960c927fb56669c5546b773906b12280c41c3f1fbfc')

build() {
  cd markupsafe
  python -m build --wheel --no-isolation
}

check() {
  cd markupsafe
  PYTHONPATH=src pytest
}

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