# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Felix Yan <felixonmars@archlinux>

pkgname=python-html2text
pkgver=2024.2.26
pkgrel=2
pkgdesc="A HTML to markdown-structured text converter"
arch=(any)
url="https://pypi.python.org/pypi/html2text/"
license=('GPL-3.0-only')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
provides=('html2text')
replaces=('html2text')
source=($pkgname-$pkgver.tar.gz::https://github.com/Alir3z4/html2text/archive/refs/tags/$pkgver.tar.gz)
sha256sums=('3632dbbb3dafbf28bee3709df67ccc48d2dc9510c75903c38f860a36e397c386')

build() {
  cd "${srcdir}"/html2text-$pkgver
  python setup.py build
}

check() {
  cd "${srcdir}"/html2text-$pkgver
  pytest
}

package() {
  cd "${srcdir}"/html2text-$pkgver

  python setup.py install --root="${pkgdir}"
}
