# borrowed from Arch without changes
# Maintainer: Norbert Pfeiler <norbert.pfeiler+aur ät gmail.com>

pkgname=txt2tags
pkgver=3.9
pkgrel=3
pkgdesc='A text formatting and conversion tool.'
arch=('any')
url='https://www.txt2tags.org/'
msys2_references=(
  "anitya: 10473"
  "purl: pkg:pypi/txt2tags"
)
license=('spdx:GPL-2.0-or-later')
depends=('python')
makedepends=(
  "python-setuptools"
  "python-build"
  "python-installer"
)
source=(https://pypi.python.org/packages/source/t/txt2tags/txt2tags-${pkgver}.tar.gz)
sha256sums=('7e4244db6a63aaa58fc17fa4cdec62b6fb89cc41d3a00ba4edaffa37f27d6746')

build() {
  cd "${pkgname}-${pkgver}"

  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd "${pkgname}-${pkgver}"

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