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

pkgname=python-docutils
_name=${pkgname#python-}
pkgver=0.22
pkgrel=1
pkgdesc='Set of tools for processing plaintext docs into formats such as HTML, XML, or LaTeX'
arch=('any')
url='http://docutils.sourceforge.net'
license=('custom')
depends=('python')
makedepends=(
  'python-build'
  'python-flit-core'
  'python-installer'
)
msys2_references=(
  'purl: pkg:pypi/docutils'
)
source=("https://downloads.sourceforge.net/$_name/$_name-$pkgver.tar.gz")
sha256sums=('ba9d57750e92331ebe7c08a1bbf7a7f8143b86c476acd51528b042216a6aad0f')

build() {
  cd "$_name"-$pkgver

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

package() {
  cd "$_name"-$pkgver

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